You are here

class CoreRequestPolicy in Tome 8

Allows CLI page requests to be cached.

@internal

Hierarchy

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
tome_static.page_cache_request_policy in modules/tome_static/tome_static.services.yml
Drupal\tome_static\PageCache\RequestPolicy\CoreRequestPolicy

File

modules/tome_static/src/PageCache/RequestPolicy/CoreRequestPolicy.php, line 16

Namespace

Drupal\tome_static\PageCache\RequestPolicy
View 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

Namesort descending Modifiers Type Description Overrides
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
CoreRequestPolicy::__construct public function Constructs the CoreRequestPolicy object.
RequestPolicyInterface::ALLOW constant Allow delivery of cached pages.
RequestPolicyInterface::DENY constant Deny delivery of cached pages.