1 | <?php |
||
7 | final class CacheFallback implements CacheInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var CacheInterface |
||
11 | */ |
||
12 | private $main; |
||
13 | |||
14 | /** |
||
15 | * @var CacheInterface |
||
16 | */ |
||
17 | private $fallback; |
||
18 | |||
19 | public function __construct(CacheInterface $main, CacheInterface $fallback, CacheInterface ...$fallbacks) |
||
25 | |||
26 | /** |
||
27 | * @inheritDoc |
||
28 | */ |
||
29 | public function get($key, $default = null) |
||
37 | |||
38 | /** |
||
39 | * @inheritDoc |
||
40 | */ |
||
41 | public function set($key, $value, $ttl = null) |
||
49 | |||
50 | /** |
||
51 | * @inheritDoc |
||
52 | */ |
||
53 | public function delete($key) |
||
61 | |||
62 | /** |
||
63 | * @inheritDoc |
||
64 | */ |
||
65 | public function clear() |
||
73 | |||
74 | /** |
||
75 | * @inheritDoc |
||
76 | */ |
||
77 | public function getMultiple($keys, $default = null) |
||
85 | |||
86 | /** |
||
87 | * @inheritDoc |
||
88 | */ |
||
89 | public function setMultiple($values, $ttl = null) |
||
97 | |||
98 | /** |
||
99 | * @inheritDoc |
||
100 | */ |
||
101 | public function deleteMultiple($keys) |
||
109 | |||
110 | /** |
||
111 | * @inheritDoc |
||
112 | */ |
||
113 | public function has($key) |
||
121 | } |
||
122 |