\Guzzle\Plugin\CacheDenyRevalidation

Never performs cache revalidation and just assumes the request is invalid

Summary

Methods
Properties
Constants
__construct()
revalidate()
shouldRevalidate()
No public properties found
No constants found
handleBadResponse()
createRevalidationRequest()
handle200Response()
handle304Response()
$storage
$canCache
N/A
No private methods found
No private properties found
N/A

Properties

Methods

__construct()

__construct() 

revalidate()

revalidate(\Guzzle\Http\Message\RequestInterface  $request, \Guzzle\Http\Message\Response  $response) : boolean

Performs a cache revalidation

Parameters

\Guzzle\Http\Message\RequestInterface $request

Request to revalidate

\Guzzle\Http\Message\Response $response

Response that was received

Returns

boolean —

Returns true if the request can be cached

shouldRevalidate()

shouldRevalidate(\Guzzle\Http\Message\RequestInterface  $request, \Guzzle\Http\Message\Response  $response) : boolean

Returns true if the response should be revalidated

Parameters

\Guzzle\Http\Message\RequestInterface $request

Request to check

\Guzzle\Http\Message\Response $response

Response to check

Returns

boolean

handleBadResponse()

handleBadResponse(\Guzzle\Http\Exception\BadResponseException  $e) 

Handles a bad response when attempting to revalidate

Parameters

\Guzzle\Http\Exception\BadResponseException $e

Exception encountered

Throws

\Guzzle\Http\Exception\BadResponseException

handle200Response()

handle200Response(\Guzzle\Http\Message\RequestInterface  $request, \Guzzle\Http\Message\Response  $validateResponse) : boolean

Handles a 200 response response from revalidating. The server does not support validation, so use this response.

Parameters

\Guzzle\Http\Message\RequestInterface $request

Request that was sent

\Guzzle\Http\Message\Response $validateResponse

Response received

Returns

boolean —

Returns true if valid, false if invalid

handle304Response()

handle304Response(\Guzzle\Http\Message\RequestInterface  $request, \Guzzle\Http\Message\Response  $validateResponse, \Guzzle\Http\Message\Response  $response) : boolean

Handle a 304 response and ensure that it is still valid

Parameters

\Guzzle\Http\Message\RequestInterface $request

Request that was sent

\Guzzle\Http\Message\Response $validateResponse

Response received

\Guzzle\Http\Message\Response $response

Original cached response

Returns

boolean —

Returns true if valid, false if invalid