PHP Interface Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface

Mostra file Open project: kevinrob/guzzle-cache-middleware Interface Usage Examples

Public Methods

Method Description
cache ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : boolean
fetch ( Psr\Http\Message\RequestInterface $request ) : CacheEntry | null Return a CacheEntry or null if no cache.
update ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : boolean

Method Details

cache() public method

public cache ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : boolean
$request Psr\Http\Message\RequestInterface
$response Psr\Http\Message\ResponseInterface
return boolean true if success

fetch() public method

Return a CacheEntry or null if no cache.
public fetch ( Psr\Http\Message\RequestInterface $request ) : CacheEntry | null
$request Psr\Http\Message\RequestInterface
return Kevinrob\GuzzleCache\CacheEntry | null

update() public method

public update ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : boolean
$request Psr\Http\Message\RequestInterface
$response Psr\Http\Message\ResponseInterface
return boolean true if success