You are here

class DynamicRequestPolicy in Tome 8

Allows CLI page requests to be cached.

@internal

Hierarchy

Expanded class hierarchy of DynamicRequestPolicy

See also

\Drupal\dynamic_page_cache\PageCache\RequestPolicy\DefaultRequestPolicy

1 file declares its use of DynamicRequestPolicy
TomeStaticServiceProvider.php in modules/tome_static/src/TomeStaticServiceProvider.php

File

modules/tome_static/src/PageCache/RequestPolicy/DynamicRequestPolicy.php, line 14

Namespace

Drupal\tome_static\PageCache\RequestPolicy
View source
class DynamicRequestPolicy extends ChainRequestPolicy {

  /**
   * Constructs the DefaultRequestPolicy object.
   */
  public function __construct() {
    $this
      ->addPolicy(new UnsafeMethod());
  }

}

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
DynamicRequestPolicy::__construct public function Constructs the DefaultRequestPolicy object.
RequestPolicyInterface::ALLOW constant Allow delivery of cached pages.
RequestPolicyInterface::DENY constant Deny delivery of cached pages.