PHP Class Cachearium\Backend\CacheMemcached

Keys are set up as: [namespace]_[id]_[subgroup] We inherit from CacheRAM to avoid fetching things multiple times.
Inheritance: extends CacheRAM
Afficher le fichier Open project: corollarium/cachearium Class Usage Examples

Méthodes publiques

Méthode Description
__clone ( ) Prevent users to clone the instance
addServers ( array $servers ) : boolean
cleanP ( $base, $id ) (non-PHPdoc)
clear ( ) (non-PHPdoc)
delete ( CacheKey $k ) (non-PHPdoc)
errorCallback ( )
get ( CacheKey $k ) (non-PHPdoc)
getFetches ( )
hasMemcachedExt ( ) : boolean Is memcached available in this system?
increment ( $value, CacheKey $k, $default ) (non-PHPdoc)
prefetch ( $data ) (non-PHPdoc)
prefetchClear ( ) Clear prefetched data. This is rarely useful.
prefetchKeys ( $keys )
report ( ) (non-PHPdoc)
singleton ( $servers = [] ) : Cache Cache constructor (this is a singleton).
store ( $data, CacheKey $k, $lifetime ) (non-PHPdoc)

Méthodes protégées

Méthode Description
hashKey ( CacheKey $k ) (non-PHPdoc)

Private Methods

Méthode Description
__construct ( ) Constructor.
getGroupString ( CacheKey $k ) : string Converts cachekey to a string for the data group.

Method Details

__clone() public méthode

Prevent users to clone the instance
public __clone ( )

addServers() public méthode

public addServers ( array $servers ) : boolean
$servers array Each entry in servers is supposed to be an array containing hostname, port, and, optionally, weight of the server. $servers = array( array('mem1.domain.com', 11211, 33), array('mem2.domain.com', 11211, 67) );
Résultat boolean

cleanP() public méthode

(non-PHPdoc)
See also: Cachearium\Backend\CacheRAM::cleanP()
public cleanP ( $base, $id )

clear() public méthode

(non-PHPdoc)
See also: Cachearium\Backend\CacheRAM::clear()
public clear ( )

delete() public méthode

(non-PHPdoc)
See also: Cachearium\Backend\CacheRAM::delete()
public delete ( CacheKey $k )
$k Cachearium\CacheKey

errorCallback() public méthode

public errorCallback ( )

get() public méthode

(non-PHPdoc)
See also: Cachearium\Backend\CacheRAM::get()
public get ( CacheKey $k )
$k Cachearium\CacheKey

getFetches() public méthode

public getFetches ( )

hasMemcachedExt() public static méthode

Is memcached available in this system?
public static hasMemcachedExt ( ) : boolean
Résultat boolean

hashKey() protected méthode

(non-PHPdoc)
See also: Cachearium\Backend\CacheRAM::hashKey()
protected hashKey ( CacheKey $k )
$k Cachearium\CacheKey

increment() public méthode

(non-PHPdoc)
See also: Cachearium\Backend\CacheRAM::increment()
public increment ( $value, CacheKey $k, $default )
$k Cachearium\CacheKey

prefetch() public méthode

(non-PHPdoc)
See also: Cachearium\Backend\CacheRAM::prefetch()
public prefetch ( $data )

prefetchClear() public méthode

Clear prefetched data. This is rarely useful.
public prefetchClear ( )

prefetchKeys() public méthode

public prefetchKeys ( $keys )

report() public méthode

(non-PHPdoc)
See also: Cachearium\Backend\CacheRAM::report()
public report ( )

singleton() public static méthode

Cache constructor (this is a singleton).
public static singleton ( $servers = [] ) : Cache
Résultat Cache The cache singleton.

store() public méthode

(non-PHPdoc)
See also: Cachearium\Backend\CacheRAM::store()
public store ( $data, CacheKey $k, $lifetime )
$k Cachearium\CacheKey