Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
AbstractDataCache Class Reference

This class is responsible for storing Arrays in PHP files. More...

+ Inheritance diagram for AbstractDataCache:

Public Member Functions

 __construct ($root, $postfix='')
 
 init ()
 
 exists ($key)
 Check if annotation-data for the key has been stored.
 
 expired ($key, $duration)
 
 store ($key, $code, $tag=null)
 Caches the given data with the given key.
 
 getRoot ()
 
 setRoot ($_root)
 
 fetch ($key)
 Fetches data stored for the given key.
 
 file_get_contents ($key)
 return data stored for the given key.
 
 getTimestamp ($key)
 Returns the timestamp of the last cache update for the given key.
 
 remove ($key)
 
 clear ()
 Clears all cache entries.
 
 getCacheFiles ($type)
 
 clearCache ($type)
 
 getCacheInfo ()
 
 getEntryKey ($key)
 

Protected Attributes

 $_root
 
 $postfix
 

Detailed Description

This class is responsible for storing Arrays in PHP files.

Inspired by (c) Rasmus Schultz rasmu.nosp@m.s@mi.nosp@m.ndpla.nosp@m.y.dk https://github.com/mindplay-dk/php-annotations Ubiquity\cache\system$AbstractDataCache This class is part of Ubiquity

Author
jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
Version
1.0.1

Definition at line 21 of file AbstractDataCache.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $root,
  $postfix = '' 
)

Reimplemented in ApcuCache.

Definition at line 25 of file AbstractDataCache.php.

Member Function Documentation

◆ clear()

clear ( )
abstract

Clears all cache entries.

Reimplemented in ApcuCache, MemCachedDriver, PhpFastCacheDriver, and RedisCacheDriver.

◆ clearCache()

clearCache (   $type)
abstract

◆ exists()

exists (   $key)
abstract

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

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

Reimplemented in ApcuCache, MemCachedDriver, PhpFastCacheDriver, and RedisCacheDriver.

◆ expired()

expired (   $key,
  $duration 
)

Definition at line 41 of file AbstractDataCache.php.

◆ fetch()

fetch (   $key)
abstract

Fetches data stored for the given key.

Parameters
string$keycache key
Returns
mixed the cached data

Reimplemented in ApcuCache, MemCachedDriver, PhpFastCacheDriver, and RedisCacheDriver.

◆ file_get_contents()

file_get_contents (   $key)
abstract

return data stored for the given key.

Parameters
string$keycache key
Returns
mixed the cached data

Reimplemented in ApcuCache, MemCachedDriver, PhpFastCacheDriver, and RedisCacheDriver.

◆ getCacheFiles()

getCacheFiles (   $type)
abstract

◆ getCacheInfo()

getCacheInfo ( )

Reimplemented in MemCachedDriver, PhpFastCacheDriver, and RedisCacheDriver.

Definition at line 114 of file AbstractDataCache.php.

◆ getEntryKey()

getEntryKey (   $key)
abstract

◆ getRoot()

getRoot ( )

Definition at line 63 of file AbstractDataCache.php.

◆ getTimestamp()

getTimestamp (   $key)
abstract

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

Parameters
string$keycache key
Returns
boolean|int unix timestamp

Reimplemented in ApcuCache, MemCachedDriver, PhpFastCacheDriver, and RedisCacheDriver.

◆ init()

init ( )

Definition at line 30 of file AbstractDataCache.php.

◆ remove()

remove (   $key)
abstract
Parameters
string$key

Reimplemented in ApcuCache, MemCachedDriver, PhpFastCacheDriver, and RedisCacheDriver.

◆ setRoot()

setRoot (   $_root)
Parameters
mixed$_root

Definition at line 71 of file AbstractDataCache.php.

◆ store()

store (   $key,
  $code,
  $tag = null 
)
abstract

Caches the given data with the given key.

Parameters
string$keycache key
mixed$codethe source-code to be cached
string$tagthe item tag
Exceptions
CacheException

Reimplemented in ApcuCache, MemCachedDriver, PhpFastCacheDriver, and RedisCacheDriver.

Field Documentation

◆ $_root

$_root
protected

Definition at line 22 of file AbstractDataCache.php.

◆ $postfix

$postfix
protected

Definition at line 23 of file AbstractDataCache.php.


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