1 | <?php |
||
7 | final class CacheMap implements CacheMapInterface, \Countable |
||
8 | { |
||
9 | /** |
||
10 | * @var array |
||
11 | */ |
||
12 | private $cache = []; |
||
13 | |||
14 | /** |
||
15 | * {@inheritdoc} |
||
16 | */ |
||
17 | public function get($key) |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | public function set($key, $value): void |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function delete($key): void |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function clear(): void |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function count(): int |
||
72 | |||
73 | /** |
||
74 | * Returns the index of the value from the cache array with the given key. |
||
75 | * |
||
76 | * @param mixed $cacheKey |
||
77 | * |
||
78 | * @return mixed |
||
79 | */ |
||
80 | private function findCacheIndexByKey($cacheKey) |
||
88 | } |
||
89 |