public function WebformUncacheableResponse::__construct in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Routing/WebformUncacheableResponse.php \Drupal\webform\Routing\WebformUncacheableResponse::__construct()
File
- src/
Routing/ WebformUncacheableResponse.php, line 15
Class
- WebformUncacheableResponse
- Provides an uncacheable response.
Namespace
Drupal\webform\RoutingCode
public function __construct($url, $status = 302, $headers = []) {
parent::__construct($url, $status, $headers);
$this
->setPrivate();
$this
->setMaxAge(0);
$this
->setSharedMaxAge(0);
$this->headers
->addCacheControlDirective('must-revalidate', TRUE);
$this->headers
->addCacheControlDirective('no-store', TRUE);
}