3 namespace Drupal\dynamic_page_cache\PageCache\RequestPolicy;
5 use Drupal\Core\PageCache\ChainRequestPolicy;
6 use Drupal\Core\PageCache\RequestPolicy\CommandLineOrUnsafeMethod;
9 * The default Dynamic Page Cache request policy.
11 * Delivery of cached pages is denied if either the application is running from
12 * the command line or the request was not initiated with a safe method (GET or
15 class DefaultRequestPolicy extends ChainRequestPolicy {
18 * Constructs the default Dynamic Page Cache request policy.
20 public function __construct() {
21 $this->addPolicy(new CommandLineOrUnsafeMethod());