1 | <?php |
||
14 | class AdapterApc implements iAdapter |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * @var bool |
||
19 | */ |
||
20 | public $installed = false; |
||
21 | |||
22 | /** |
||
23 | * @var bool |
||
24 | */ |
||
25 | public $debug = false; |
||
26 | |||
27 | /** |
||
28 | * __construct() |
||
29 | */ |
||
30 | public function __construct() |
||
40 | |||
41 | /** |
||
42 | * Check if apc-cache exists. |
||
43 | * |
||
44 | * WARNING: use $this->exists($key) instead |
||
45 | * |
||
46 | * @param string $key |
||
47 | * |
||
48 | * @return bool |
||
49 | * |
||
50 | * @internal |
||
51 | */ |
||
52 | public function apc_cache_exists($key): bool |
||
56 | |||
57 | /** |
||
58 | * Clears the APC cache by type. |
||
59 | * |
||
60 | * @param string $type - If $type is "user", the user cache will be cleared; otherwise, |
||
61 | * the system cache (cached files) will be cleared. |
||
62 | * |
||
63 | * @return bool |
||
64 | * |
||
65 | * @internal |
||
66 | */ |
||
67 | public function cacheClear(string $type): bool |
||
71 | |||
72 | /** |
||
73 | * Retrieves cached information from APC's data store |
||
74 | * |
||
75 | * @param string $type - If $type is "user", information about the user cache will be returned. |
||
76 | * @param bool $limited - If $limited is TRUE, the return value will exclude the individual list of cache entries. |
||
77 | * This is useful when trying to optimize calls for statistics gathering. |
||
78 | * |
||
79 | * @return array of cached data (and meta-data) or FALSE on failure. |
||
80 | */ |
||
81 | public function cacheInfo(string $type = '', bool $limited = false): array |
||
85 | |||
86 | /** |
||
87 | * @inheritdoc |
||
88 | */ |
||
89 | public function exists(string $key): bool |
||
97 | |||
98 | /** |
||
99 | * @inheritdoc |
||
100 | */ |
||
101 | public function get(string $key) |
||
109 | |||
110 | /** |
||
111 | * @inheritdoc |
||
112 | */ |
||
113 | public function installed(): bool |
||
117 | |||
118 | /** |
||
119 | * @inheritdoc |
||
120 | */ |
||
121 | public function remove(string $key): bool |
||
125 | |||
126 | /** |
||
127 | * @inheritdoc |
||
128 | */ |
||
129 | public function removeAll(): bool |
||
133 | |||
134 | /** |
||
135 | * @inheritdoc |
||
136 | */ |
||
137 | public function set(string $key, $value): bool |
||
141 | |||
142 | /** |
||
143 | * @inheritdoc |
||
144 | */ |
||
145 | public function setExpired(string $key, $data, int $ttl = 0): bool |
||
149 | |||
150 | } |
||
151 |