class NoServerError implements ResponsePolicyInterface (View source)

A policy denying caching of a server error (HTTP 5xx) responses.

Methods

string|null
check(Response $response, Request $request)

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

Details

string|null check(Response $response, Request $request)

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

Parameters

Response $response

The response which is about to be sent to the client.

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.