Ubiquity  2.0.0
php rapid development framework
ApcuCache Class Reference

This class is responsible for storing values in apcu cache. More...

+ Inheritance diagram for ApcuCache:

Public Member Functions

 __construct ($root, $postfix="")
 Initializes the apcu cache-provider. More...
 
 exists ($key)
 Check if annotation-data for the key has been stored. More...
 
 store ($key, $code, $tag, $php=true)
 
 fetch ($key)
 Fetches data stored for the given key. More...
 
 file_get_contents ($key)
 return data stored for the given key. More...
 
 getTimestamp ($key)
 Returns the timestamp of the last cache update for the given key. More...
 
 remove ($key)
 
 clear ()
 
 getCacheFiles ($type)
 
 clearCache ($type)
 
 getEntryKey ($key)
 
- Public Member Functions inherited from AbstractDataCache
 __construct ($root, $postfix="")
 
 exists ($key)
 Check if annotation-data for the key has been stored. More...
 
 expired ($key, $duration)
 
 store ($key, $code, $tag=null, $php=true)
 Caches the given data with the given key. More...
 
 getRoot ()
 
 fetch ($key)
 Fetches data stored for the given key. More...
 
 file_get_contents ($key)
 return data stored for the given key. More...
 
 getTimestamp ($key)
 Returns the timestamp of the last cache update for the given key. More...
 
 remove ($key)
 
 clear ()
 Clears all cache entries. More...
 
 getCacheFiles ($type)
 
 clearCache ($type)
 
 getCacheInfo ()
 
 getEntryKey ($key)
 

Protected Member Functions

 storeContent ($key, $content, $tag)
 Caches the given data with the given key. More...
 
 getRealKey ($key)
 
 getCacheEntries ($type)
 
 getAllEntries ()
 
- Protected Member Functions inherited from AbstractDataCache
 storeContent ($key, $content, $tag)
 

Additional Inherited Members

- Data Fields inherited from AbstractDataCache
const PHP_TAG ="<?php\n"
 
- Protected Attributes inherited from AbstractDataCache
 $_root
 
 $postfix
 

Detailed Description

This class is responsible for storing values in apcu cache.

Definition at line 10 of file ApcuCache.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $root,
  $postfix = "" 
)

Initializes the apcu cache-provider.

Definition at line 14 of file ApcuCache.php.

Member Function Documentation

◆ clear()

clear ( )

Definition at line 90 of file ApcuCache.php.

◆ clearCache()

clearCache (   $type)

Definition at line 122 of file ApcuCache.php.

◆ exists()

exists (   $key)

Check if annotation-data for the key has been stored.

Parameters
string$keycache key
Returns
string[]|boolean true if data with the given key has been stored; otherwise false

Definition at line 23 of file ApcuCache.php.

◆ fetch()

fetch (   $key)

Fetches data stored for the given key.

Parameters
string$keycache key
Returns
mixed the cached data

Definition at line 50 of file ApcuCache.php.

◆ file_get_contents()

file_get_contents (   $key)

return data stored for the given key.

Parameters
string$keycache key
Returns
mixed the cached data

Definition at line 60 of file ApcuCache.php.

◆ getAllEntries()

getAllEntries ( )
protected

Definition at line 99 of file ApcuCache.php.

◆ getCacheEntries()

getCacheEntries (   $type)
protected

Definition at line 94 of file ApcuCache.php.

◆ getCacheFiles()

getCacheFiles (   $type)

Definition at line 108 of file ApcuCache.php.

◆ getEntryKey()

getEntryKey (   $key)

Definition at line 129 of file ApcuCache.php.

◆ getRealKey()

getRealKey (   $key)
protected

Definition at line 41 of file ApcuCache.php.

◆ getTimestamp()

getTimestamp (   $key)

Returns the timestamp of the last cache update for the given key.

Parameters
string$keycache key
Returns
boolean|int unix timestamp

Definition at line 70 of file ApcuCache.php.

◆ remove()

remove (   $key)

Definition at line 86 of file ApcuCache.php.

◆ store()

store (   $key,
  $code,
  $tag,
  $php = true 
)

Definition at line 27 of file ApcuCache.php.

◆ storeContent()

storeContent (   $key,
  $content,
  $tag 
)
protected

Caches the given data with the given key.

Parameters
string$keycache key
string$contentthe source-code to be cached
string$tagnot used

Definition at line 37 of file ApcuCache.php.


The documentation for this class was generated from the following file: