27 public function store($key, $code, $tag,$php=
true) {
38 \apcu_store($this->
getRealKey($key), $content);
72 $cache = \apcu_cache_info();
73 if (empty($cache[
'cache_list'])) {
76 foreach ($cache[
'cache_list'] as $entry) {
77 if ($entry[
'info'] != $key) {
80 $creationTime = $entry[
'creation_time'];
86 public function remove($key) {
96 return \array_filter($entries,
function($v) use ($type){
return UString::startswith($v[
'info'], $type);});
101 $cache = \apcu_cache_info();
102 if (!empty($cache[
'cache_list'])) {
103 $entries=$cache[
'cache_list'];
111 foreach ($entries as $entry) {
114 $result[]=
new CacheFile(\ucfirst($type),$key,$entry[
'creation_time'],$entry[
'mem_size'],$key);
117 if(\
sizeof($result)===0)
118 $result[]=
new CacheFile(\ucfirst($type),
"",
"",
"");
124 foreach ($entries as $entry){
125 $this->
remove($entry[
'info']);
fetch($key)
Fetches data stored for the given key.
store($key, $code, $tag, $php=true)
storeContent($key, $content, $tag)
Caches the given data with the given key.
This class is responsible for storing values in apcu cache.
file_get_contents($key)
return data stored for the given key.
Inspired by (c) Rasmus Schultz rasmus@mindplay.dk https://github.com/mindplay-dk/php-annotations ...
getTimestamp($key)
Returns the timestamp of the last cache update for the given key.
exists($key)
Check if annotation-data for the key has been stored.
This class is responsible for storing Arrays in PHP files.
__construct($root, $postfix="")
Initializes the apcu cache-provider.
static startswith($hay, $needle)