protected function FinishResponseSubscriber::setCacheControlNoCache
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\EventSubscriberCode
protected function setCacheControlNoCache(Response $response) { $response->headers->set('Cache-Control', 'no-cache, must-revalidate'); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!EventSubscriber!FinishResponseSubscriber.php/function/FinishResponseSubscriber::setCacheControlNoCache/8.1.x