1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44:
<?php
namespace Guzzle\Plugin\Cache;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Http\Message\Response;
/**
* Interface used to cache HTTP requests
*/
interface CacheStorageInterface
{
/**
* Get a Response from the cache for a request
*
* @param RequestInterface $request
*
* @return null|Response
*/
public function fetch(RequestInterface $request);
/**
* Cache an HTTP request
*
* @param RequestInterface $request Request being cached
* @param Response $response Response to cache
*/
public function cache(RequestInterface $request, Response $response);
/**
* Deletes cache entries that match a request
*
* @param RequestInterface $request Request to delete from cache
*/
public function delete(RequestInterface $request);
/**
* Purge all cache entries for a given URL
*
* @param string $url
*/
public function purge($url);
}