1 | <?php |
||
8 | class ApcuCache implements CacheInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | 16 | private $namespace; |
|
14 | /** |
||
15 | 16 | * @var int |
|
16 | */ |
||
17 | 2 | private $defaultLifetime; |
|
18 | |||
19 | public function __construct($namespace = '', $defaultLifetime = 0) |
||
24 | |||
25 | 2 | /** |
|
26 | * {@inheritdoc} |
||
27 | 2 | */ |
|
28 | public function get($key, $default = null) |
||
35 | 2 | ||
36 | /** |
||
37 | 2 | * {@inheritdoc} |
|
38 | */ |
||
39 | public function set($key, $value, $ttl = null) |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | 2 | */ |
|
52 | public function delete($key) |
||
59 | 2 | ||
60 | 1 | /** |
|
61 | * {@inheritdoc} |
||
62 | 2 | */ |
|
63 | public function clear() |
||
67 | |||
68 | 2 | /** |
|
69 | * {@inheritdoc} |
||
70 | 2 | */ |
|
71 | public function getMultiple($keys, $default = null) |
||
93 | |||
94 | 4 | /** |
|
95 | * {@inheritdoc} |
||
96 | 4 | */ |
|
97 | public function setMultiple($values, $ttl = null) |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | public function deleteMultiple($keys) |
||
126 | |||
127 | /** |
||
128 | * {@inheritdoc} |
||
129 | */ |
||
130 | public function has($key) |
||
137 | |||
138 | /** |
||
139 | * @param string $key |
||
140 | * |
||
141 | * @return string |
||
142 | */ |
||
143 | private function buildKeyName($key) |
||
147 | |||
148 | /** |
||
149 | * @param string[] $keys |
||
150 | * |
||
151 | * @return string[] |
||
152 | */ |
||
153 | private function buildKeyNames(array $keys) |
||
160 | |||
161 | /** |
||
162 | * @param mixed $key |
||
163 | * |
||
164 | * @throws ApcuInvalidCacheKeyException |
||
165 | */ |
||
166 | private function assertKeyName($key) |
||
172 | |||
173 | /** |
||
174 | * @param string[] $keys |
||
175 | * |
||
176 | * @throws ApcuInvalidCacheKeyException |
||
177 | */ |
||
178 | private function assertKeyNames(array $keys) |
||
184 | } |
||
185 |