1 | <?php |
||
20 | abstract class AbstractSimpleCache extends AbstractMiddleware |
||
21 | { |
||
22 | /** |
||
23 | * @var CacheInterface |
||
24 | */ |
||
25 | public $cache; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | public $key; |
||
31 | |||
32 | /** |
||
33 | * @inheritdoc |
||
34 | */ |
||
35 | public function init() |
||
50 | |||
51 | /** |
||
52 | * Returns the id used to cache a request. |
||
53 | * |
||
54 | * @param RequestInterface $request |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | protected function getCacheKey(RequestInterface $request): string |
||
65 | |||
66 | /** |
||
67 | * @param ResponseInterface $response |
||
68 | * @return bool |
||
69 | */ |
||
70 | protected function isResponseSuccessful(ResponseInterface $response): bool |
||
86 | } |
||
87 |