protected FinishResponseSubscriber::setCacheControlNoCache(Response $response)
Disable caching in the browser and for HTTP/1.1 proxies and clients.
Parameters
\Symfony\Component\HttpFoundation\Response $response: A response object.
File
- core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php, line 260
Class
- FinishResponseSubscriber
- Response subscriber to handle finished responses.
Namespace
Drupal\Core\EventSubscriber
Code
protected function setCacheControlNoCache(Response $response) { $response->headers->set('Cache-Control', 'no-cache, must-revalidate'); }
Please login to continue.