WebformUncacheableResponse.php in Webform 8.5
File
src/Routing/WebformUncacheableResponse.php
View source
<?php
namespace Drupal\webform\Routing;
use Symfony\Component\HttpFoundation\Response;
class WebformUncacheableResponse extends Response {
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);
}
}