function NoServerError::check
Same name in other branches
- 8.9.x core/lib/Drupal/Core/PageCache/ResponsePolicy/NoServerError.php \Drupal\Core\PageCache\ResponsePolicy\NoServerError::check()
- 10 core/lib/Drupal/Core/PageCache/ResponsePolicy/NoServerError.php \Drupal\Core\PageCache\ResponsePolicy\NoServerError::check()
- 11.x core/lib/Drupal/Core/PageCache/ResponsePolicy/NoServerError.php \Drupal\Core\PageCache\ResponsePolicy\NoServerError::check()
Overrides ResponsePolicyInterface::check
File
-
core/
lib/ Drupal/ Core/ PageCache/ ResponsePolicy/ NoServerError.php, line 17
Class
- NoServerError
- A policy denying caching of a server error (HTTP 5xx) responses.
Namespace
Drupal\Core\PageCache\ResponsePolicyCode
public function check(Response $response, Request $request) {
if ($response->isServerError()) {
return static::DENY;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.