1 | <?php |
||
8 | class ResponseCacheRepository |
||
9 | { |
||
10 | /** @var \Illuminate\Cache\Repository */ |
||
11 | protected $cache; |
||
12 | |||
13 | /** @var \Spatie\ResponseCache\ResponseSerializer */ |
||
14 | protected $responseSerializer; |
||
15 | |||
16 | public function __construct(ResponseSerializer $responseSerializer, Repository $cache) |
||
21 | |||
22 | /** |
||
23 | * @param string $key |
||
24 | * @param \Symfony\Component\HttpFoundation\Response $response |
||
25 | * @param \DateTime|int $minutes |
||
26 | */ |
||
27 | public function put(string $key, $response, $minutes) |
||
31 | |||
32 | public function has(string $key): bool |
||
36 | |||
37 | public function get(string $key): Response |
||
41 | |||
42 | /** |
||
43 | * @deprecated Use the new clear method, this is just an alias. |
||
44 | */ |
||
45 | public function flush() |
||
49 | |||
50 | public function clear() |
||
54 | |||
55 | public function forget(string $key): bool |
||
59 | } |
||
60 |