W3cubDocs

/Drupal 8

public function ResponsePolicyInterface::check

public ResponsePolicyInterface::check(Response $response, Request $request)

Determines whether it is save to store a page in the cache.

Parameters

\Symfony\Component\HttpFoundation\Response $response: The response which is about to be sent to the client.

\Symfony\Component\HttpFoundation\Request $request: The request object.

Return value

string|NULL Either static::DENY or NULL. Calling code may attempt to store a page in the cache unless static::DENY is returned. Returns NULL if the policy policy is not specified for the given response.

File

core/lib/Drupal/Core/PageCache/ResponsePolicyInterface.php, line 35

Class

ResponsePolicyInterface
Defines the interface for response policy implementations.

Namespace

Drupal\Core\PageCache

Code

public function check(Response $response, Request $request);

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!PageCache!ResponsePolicyInterface.php/function/ResponsePolicyInterface::check/8.1.x