function DenyNoCacheRoutes::check
Same name in other branches
- 8.9.x core/lib/Drupal/Core/PageCache/ResponsePolicy/DenyNoCacheRoutes.php \Drupal\Core\PageCache\ResponsePolicy\DenyNoCacheRoutes::check()
- 10 core/lib/Drupal/Core/PageCache/ResponsePolicy/DenyNoCacheRoutes.php \Drupal\Core\PageCache\ResponsePolicy\DenyNoCacheRoutes::check()
- 11.x core/lib/Drupal/Core/PageCache/ResponsePolicy/DenyNoCacheRoutes.php \Drupal\Core\PageCache\ResponsePolicy\DenyNoCacheRoutes::check()
Overrides ResponsePolicyInterface::check
File
-
core/
lib/ Drupal/ Core/ PageCache/ ResponsePolicy/ DenyNoCacheRoutes.php, line 38
Class
- DenyNoCacheRoutes
- Cache policy for routes with the 'no_cache' option set.
Namespace
Drupal\Core\PageCache\ResponsePolicyCode
public function check(Response $response, Request $request) {
if (($route = $this->routeMatch
->getRouteObject()) && $route->getOption('no_cache')) {
return static::DENY;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.