public function WebformUncacheableResponse::__construct in Webform 8.5
Same name and namespace in other branches
- 6.x 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);
}