DefaultRequestPolicy.php
Same filename in this branch
Same filename in other branches
- 9 core/modules/dynamic_page_cache/src/PageCache/RequestPolicy/DefaultRequestPolicy.php
- 9 core/lib/Drupal/Core/PageCache/DefaultRequestPolicy.php
- 8.9.x core/modules/dynamic_page_cache/src/PageCache/RequestPolicy/DefaultRequestPolicy.php
- 8.9.x core/lib/Drupal/Core/PageCache/DefaultRequestPolicy.php
- 10 core/modules/dynamic_page_cache/src/PageCache/RequestPolicy/DefaultRequestPolicy.php
- 10 core/lib/Drupal/Core/PageCache/DefaultRequestPolicy.php
Namespace
Drupal\dynamic_page_cache\PageCache\RequestPolicyFile
-
core/
modules/ dynamic_page_cache/ src/ PageCache/ RequestPolicy/ DefaultRequestPolicy.php
View source
<?php
namespace Drupal\dynamic_page_cache\PageCache\RequestPolicy;
use Drupal\Core\PageCache\ChainRequestPolicy;
use Drupal\Core\PageCache\RequestPolicy\CommandLineOrUnsafeMethod;
/**
* The default Dynamic 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).
*/
class DefaultRequestPolicy extends ChainRequestPolicy {
/**
* Constructs the default Dynamic Page Cache request policy.
*/
public function __construct() {
$this->addPolicy(new CommandLineOrUnsafeMethod());
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
DefaultRequestPolicy | The default Dynamic Page Cache request policy. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.