class CoreRequestPolicy in Tome 8
Allows CLI page requests to be cached.
@internal
Hierarchy
- class \Drupal\Core\PageCache\ChainRequestPolicy implements ChainRequestPolicyInterface
- class \Drupal\tome_static\PageCache\RequestPolicy\CoreRequestPolicy
Expanded class hierarchy of CoreRequestPolicy
See also
\Drupal\Core\PageCache\DefaultRequestPolicy
1 string reference to 'CoreRequestPolicy'
- tome_static.services.yml in modules/
tome_static/ tome_static.services.yml - modules/tome_static/tome_static.services.yml
1 service uses CoreRequestPolicy
File
- modules/
tome_static/ src/ PageCache/ RequestPolicy/ CoreRequestPolicy.php, line 16
Namespace
Drupal\tome_static\PageCache\RequestPolicyView source
class CoreRequestPolicy extends ChainRequestPolicy {
/**
* Constructs the CoreRequestPolicy object.
*
* @param \Drupal\Core\Session\SessionConfigurationInterface $session_configuration
* The session configuration.
*/
public function __construct(SessionConfigurationInterface $session_configuration) {
$this
->addPolicy(new UnsafeMethod());
$this
->addPolicy(new NoSessionOpen($session_configuration));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ChainRequestPolicy:: |
protected | property | A list of policy rules to apply when this policy is evaluated. | |
ChainRequestPolicy:: |
public | function |
Add a policy to the list of policy rules. Overrides ChainRequestPolicyInterface:: |
|
ChainRequestPolicy:: |
public | function |
Determines whether delivery of a cached page should be attempted. Overrides RequestPolicyInterface:: |
|
CoreRequestPolicy:: |
public | function | Constructs the CoreRequestPolicy object. | |
RequestPolicyInterface:: |
constant | Allow delivery of cached pages. | ||
RequestPolicyInterface:: |
constant | Deny delivery of cached pages. |