CommandLineOrUnsafeMethod

Reject when running from the command line or when HTTP method is not safe.

The policy denies caching if the request was initiated from the command line interface (drush) or the request method is neither GET nor HEAD (see RFC 2616, section 9.1.1 - Safe Methods).

Hierarchy

File

core/lib/Drupal/Core/PageCache/RequestPolicy/CommandLineOrUnsafeMethod.php, line 15

Namespace

Drupal\Core\PageCache\RequestPolicy

Members

Name Modifiers Type Description
CommandLineOrUnsafeMethod::check public function Determines whether delivery of a cached page should be attempted. Overrides RequestPolicyInterface::check
CommandLineOrUnsafeMethod::isCli protected function Indicates whether this is a CLI request.
RequestPolicyInterface::ALLOW constant Allow delivery of cached pages.
RequestPolicyInterface::DENY constant Deny delivery of cached pages.
doc_Drupal
2016-10-29 08:50:10
Comments
Leave a Comment

Please login to continue.