class NoServerError
Same name in other branches
- 9 core/lib/Drupal/Core/PageCache/ResponsePolicy/NoServerError.php \Drupal\Core\PageCache\ResponsePolicy\NoServerError
- 8.9.x core/lib/Drupal/Core/PageCache/ResponsePolicy/NoServerError.php \Drupal\Core\PageCache\ResponsePolicy\NoServerError
- 10 core/lib/Drupal/Core/PageCache/ResponsePolicy/NoServerError.php \Drupal\Core\PageCache\ResponsePolicy\NoServerError
A policy denying caching of a server error (HTTP 5xx) responses.
Hierarchy
- class \Drupal\Core\PageCache\ResponsePolicy\NoServerError implements \Drupal\Core\PageCache\ResponsePolicyInterface
Expanded class hierarchy of NoServerError
File
-
core/
lib/ Drupal/ Core/ PageCache/ ResponsePolicy/ NoServerError.php, line 12
Namespace
Drupal\Core\PageCache\ResponsePolicyView source
class NoServerError implements ResponsePolicyInterface {
/**
* {@inheritdoc}
*/
public function check(Response $response, Request $request) {
if ($response->isServerError()) {
return static::DENY;
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
NoServerError::check | public | function | Determines whether it is save to store a page in the cache. | Overrides ResponsePolicyInterface::check |
ResponsePolicyInterface::DENY | constant | Deny storage of a page in the cache. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.