1 | <?php |
||
19 | class Apc extends Cache_Method_Abstract |
||
20 | { |
||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | */ |
||
24 | protected $title = 'Alternative PHP Cache'; |
||
25 | |||
26 | /** |
||
27 | * Whether to use the APCu functions or the original APC ones. |
||
28 | * |
||
29 | * @var bool |
||
30 | */ |
||
31 | protected $apcu = false; |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | 2 | public function __construct($options) |
|
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | 1 | public function exists($key) |
|
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | 1 | public function put($key, $value, $ttl = 120) |
|
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | 1 | public function get($key, $ttl = 120) |
|
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | 1 | public function clean($type = '') |
|
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | 2 | public function isAvailable() |
|
119 | { |
||
120 | 2 | return function_exists('apc_store') || function_exists('apcu_store'); |
|
121 | } |
||
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | */ |
||
126 | public function details() |
||
130 | } |
||
131 |