1 | <?php |
||
13 | class DualCacheStore extends TaggableStore implements Store |
||
14 | { |
||
15 | use RetrievesMultipleKeys; |
||
16 | |||
17 | /** @var Store */ |
||
18 | protected $primaryStore; |
||
19 | |||
20 | /** @var Store */ |
||
21 | protected $secondaryStore; |
||
22 | |||
23 | /** @var DualCacheHandlerInterface */ |
||
24 | protected $cacheHandler; |
||
25 | |||
26 | /** |
||
27 | * @param Store $primaryStore |
||
28 | * @param Store $secondaryStore |
||
29 | * @param DualCacheHandlerInterface $cacheHandler |
||
30 | */ |
||
31 | public function __construct( |
||
40 | |||
41 | /** |
||
42 | * @param array|string $key |
||
43 | * |
||
44 | * @return mixed |
||
45 | * @throws \Throwable |
||
46 | */ |
||
47 | public function get($key) |
||
60 | |||
61 | /** |
||
62 | * @param string $key |
||
63 | * @param mixed $value |
||
64 | * @param float|int $minutes |
||
65 | * |
||
66 | * @throws \Throwable |
||
67 | */ |
||
68 | public function put($key, $value, $minutes) |
||
77 | |||
78 | /** |
||
79 | * @param string $key |
||
80 | * @param int $value |
||
81 | * |
||
82 | * @return bool|int|mixed |
||
83 | * @throws \Throwable |
||
84 | */ |
||
85 | public function increment($key, $value = 1) |
||
108 | |||
109 | /** |
||
110 | * @param string $key |
||
111 | * @param int $value |
||
112 | * |
||
113 | * @return bool|int|mixed |
||
114 | * @throws \Throwable |
||
115 | */ |
||
116 | public function decrement($key, $value = 1) |
||
139 | |||
140 | /** |
||
141 | * @param string $key |
||
142 | * @param mixed $value |
||
143 | * |
||
144 | * @throws \Throwable |
||
145 | */ |
||
146 | public function forever($key, $value) |
||
150 | |||
151 | /** |
||
152 | * @param string $key |
||
153 | * |
||
154 | * @return bool|mixed |
||
155 | * @throws \Throwable |
||
156 | */ |
||
157 | public function forget($key) |
||
172 | |||
173 | /** |
||
174 | * @return void |
||
175 | * @throws \Throwable |
||
176 | */ |
||
177 | public function flush() |
||
184 | |||
185 | /** |
||
186 | * {@inheritdoc} |
||
187 | * @codeCoverageIgnore |
||
188 | */ |
||
189 | public function getPrefix(): string |
||
193 | } |
||
194 |