1 <?php 2 3 namespace Kevinrob\GuzzleCache\Strategy; 4 5 use Kevinrob\GuzzleCache\CacheEntry; 6 use Psr\Http\Message\RequestInterface; 7 use Psr\Http\Message\ResponseInterface; 8 9 interface CacheStrategyInterface 10 { 11 /** 12 * Return a CacheEntry or null if no cache. 13 * 14 * @param RequestInterface $request 15 * 16 * @return CacheEntry|null 17 */ 18 public function fetch(RequestInterface $request); 19 20 /** 21 * @param RequestInterface $request 22 * @param ResponseInterface $response 23 * 24 * @return bool true if success 25 */ 26 public function cache(RequestInterface $request, ResponseInterface $response); 27 28 /** 29 * @param RequestInterface $request 30 * @param ResponseInterface $response 31 * 32 * @return bool true if success 33 */ 34 public function update(RequestInterface $request, ResponseInterface $response); 35 36 /** 37 * @param RequestInterface $request 38 * 39 * @return bool 40 */ 41 public function delete(RequestInterface $request); 42 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body