function DefaultRequestPolicy::__construct

Same name in this branch
  1. 9 core/modules/dynamic_page_cache/src/PageCache/RequestPolicy/DefaultRequestPolicy.php \Drupal\dynamic_page_cache\PageCache\RequestPolicy\DefaultRequestPolicy::__construct()
Same name in other branches
  1. 8.9.x core/modules/dynamic_page_cache/src/PageCache/RequestPolicy/DefaultRequestPolicy.php \Drupal\dynamic_page_cache\PageCache\RequestPolicy\DefaultRequestPolicy::__construct()
  2. 8.9.x core/lib/Drupal/Core/PageCache/DefaultRequestPolicy.php \Drupal\Core\PageCache\DefaultRequestPolicy::__construct()
  3. 10 core/modules/dynamic_page_cache/src/PageCache/RequestPolicy/DefaultRequestPolicy.php \Drupal\dynamic_page_cache\PageCache\RequestPolicy\DefaultRequestPolicy::__construct()
  4. 10 core/lib/Drupal/Core/PageCache/DefaultRequestPolicy.php \Drupal\Core\PageCache\DefaultRequestPolicy::__construct()
  5. 11.x core/modules/dynamic_page_cache/src/PageCache/RequestPolicy/DefaultRequestPolicy.php \Drupal\dynamic_page_cache\PageCache\RequestPolicy\DefaultRequestPolicy::__construct()
  6. 11.x core/lib/Drupal/Core/PageCache/DefaultRequestPolicy.php \Drupal\Core\PageCache\DefaultRequestPolicy::__construct()

Constructs the default page cache request policy.

Parameters

\Drupal\Core\Session\SessionConfigurationInterface $session_configuration: The session configuration.

File

core/lib/Drupal/Core/PageCache/DefaultRequestPolicy.php, line 24

Class

DefaultRequestPolicy
The default page cache request policy.

Namespace

Drupal\Core\PageCache

Code

public function __construct(SessionConfigurationInterface $session_configuration) {
    $this->addPolicy(new CommandLineOrUnsafeMethod());
    $this->addPolicy(new NoSessionOpen($session_configuration));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.