The default page cache request policy.
Delivery of cached pages is denied if either the application is running from the command line or the request was not initiated with a safe method (GET or HEAD). Also caching is only allowed for requests without a session cookie.
Name | Modifiers | Type | Description |
---|---|---|---|
ChainRequestPolicy::$rules | protected | property | A list of policy rules to apply when this policy is evaluated. |
ChainRequestPolicy::addPolicy | public | function | Add a policy to the list of policy rules. Overrides ChainRequestPolicyInterface::addPolicy |
ChainRequestPolicy::check | public | function | Determines whether delivery of a cached page should be attempted. Overrides RequestPolicyInterface::check |
DefaultRequestPolicy::__construct | public | function | Constructs the default page cache request policy. |
RequestPolicyInterface::ALLOW | constant | Allow delivery of cached pages. | |
RequestPolicyInterface::DENY | constant | Deny delivery of cached pages. |
© 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!PageCache!DefaultRequestPolicy.php/class/DefaultRequestPolicy/8.1.x