1 | <?php |
||
9 | class ApcuCache implements CacheInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $namespace; |
||
15 | |||
16 | /** |
||
17 | * @var int |
||
18 | */ |
||
19 | 22 | private $defaultLifetime; |
|
20 | |||
21 | 22 | public function __construct($namespace = '', $defaultLifetime = 0) |
|
26 | |||
27 | /** |
||
28 | 18 | * {@inheritdoc} |
|
29 | */ |
||
30 | 18 | public function get($key, $default = null) |
|
42 | 8 | ||
43 | /** |
||
44 | 8 | * {@inheritdoc} |
|
45 | */ |
||
46 | 8 | public function set($key, $value, $ttl = null) |
|
55 | 2 | ||
56 | /** |
||
57 | 2 | * {@inheritdoc} |
|
58 | */ |
||
59 | public function delete($key) |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function clear() |
||
74 | 2 | ||
75 | /** |
||
76 | 2 | * {@inheritdoc} |
|
77 | */ |
||
78 | 2 | public function getMultiple($keys, $default = null) |
|
101 | 2 | ||
102 | /** |
||
103 | 2 | * {@inheritdoc} |
|
104 | 2 | */ |
|
105 | 1 | public function setMultiple($values, $ttl = null) |
|
122 | 2 | ||
123 | /** |
||
124 | 2 | * {@inheritdoc} |
|
125 | */ |
||
126 | public function deleteMultiple($keys) |
||
136 | |||
137 | /** |
||
138 | * {@inheritdoc} |
||
139 | */ |
||
140 | public function has($key) |
||
147 | |||
148 | /** |
||
149 | * @param string $key |
||
150 | * |
||
151 | * @return string |
||
152 | */ |
||
153 | 2 | private function buildKeyName($key) |
|
157 | 2 | ||
158 | /** |
||
159 | * @param string[] $keys |
||
160 | * |
||
161 | * @return string[] |
||
162 | * |
||
163 | * @throws ApcuInvalidCacheKeysException |
||
164 | */ |
||
165 | private function buildKeyNames($keys) |
||
171 | 10 | ||
172 | /** |
||
173 | * @param mixed $key |
||
174 | * |
||
175 | * @throws ApcuInvalidCacheKeyException |
||
176 | */ |
||
177 | private function assertKeyName($key) |
||
183 | 2 | ||
184 | /** |
||
185 | * @param string[] $keys |
||
186 | * |
||
187 | * @throws ApcuInvalidCacheKeyException |
||
188 | */ |
||
189 | private function assertKeyNames(array $keys) |
||
195 | |||
196 | /** |
||
197 | * @param string[]|object|\Traversable $keys |
||
198 | * |
||
199 | * @throws ApcuInvalidCacheKeysException |
||
200 | */ |
||
201 | private function convertKeysToArray($keys) |
||
209 | |||
210 | /** |
||
211 | * @param string[]|object|\Traversable $keys |
||
212 | * |
||
213 | * @return bool |
||
214 | */ |
||
215 | private function isIterableKeys($keys) |
||
223 | } |
||
224 |