Class Guzzle\Plugin\Cache\CallbackCanCacheStrategy

InheritanceGuzzle\Plugin\Cache\CallbackCanCacheStrategy » Guzzle\Plugin\Cache\DefaultCanCacheStrategy
ImplementsGuzzle\Plugin\Cache\CanCacheStrategyInterface

Determines if a request can be cached using a callback

Property Details

$requestCallback protected property

Callback for request

protected callable $requestCallback null
$responseCallback protected property

Callback for response

protected callable $responseCallback null

Method Details

__construct() public method

public void __construct ( $requestCallback null, $responseCallback null )
$requestCallback Closure|array|mixed

Callable method to invoke for requests

$responseCallback Closure|array|mixed

Callable method to invoke for responses

throws Guzzle\Common\Exception\InvalidArgumentException
canCacheRequest() public method

public void canCacheRequest ( Guzzle\Http\Message\RequestInterface $request )
$request
canCacheResponse() public method

public void canCacheResponse ( Guzzle\Http\Message\Response $response )
$response