PHP Class Nette\Caching\Storages\NewMemcachedStorage

Inheritance: implements Nette\Caching\IStorage, implements Nette\Caching\IBulkReader, use trait Nette\SmartObject
Afficher le fichier Open project: nette/caching

Méthodes publiques

Méthode Description
__construct ( $host = 'localhost', $port = 11211, $prefix = '', Nette\Caching\Storages\IJournal $journal = NULL )
addServer ( $host = 'localhost', $port = 11211 )
bulkRead ( array $keys ) : array Reads from cache in bulk.
clean ( array $conditions ) : void Removes items from the cache by conditions & garbage collector.
getConnection ( ) : Memcached
isAvailable ( ) : boolean Checks if Memcached extension is available.
lock ( $key ) : void Prevents item reading and writing. Lock is released by write() or remove().
read ( $key ) : mixed | null Read from cache.
remove ( $key ) : void Removes item from the cache.
write ( $key, $data, array $dp ) : void Writes item into the cache.

Method Details

__construct() public méthode

public __construct ( $host = 'localhost', $port = 11211, $prefix = '', Nette\Caching\Storages\IJournal $journal = NULL )
$journal Nette\Caching\Storages\IJournal

addServer() public méthode

public addServer ( $host = 'localhost', $port = 11211 )

bulkRead() public méthode

Reads from cache in bulk.
public bulkRead ( array $keys ) : array
$keys array
Résultat array key => value pairs, missing items are omitted

clean() public méthode

Removes items from the cache by conditions & garbage collector.
public clean ( array $conditions ) : void
$conditions array
Résultat void

getConnection() public méthode

public getConnection ( ) : Memcached
Résultat Memcached

isAvailable() public static méthode

Checks if Memcached extension is available.
public static isAvailable ( ) : boolean
Résultat boolean

lock() public méthode

Prevents item reading and writing. Lock is released by write() or remove().
public lock ( $key ) : void
Résultat void

read() public méthode

Read from cache.
public read ( $key ) : mixed | null
Résultat mixed | null

remove() public méthode

Removes item from the cache.
public remove ( $key ) : void
Résultat void

write() public méthode

Writes item into the cache.
public write ( $key, $data, array $dp ) : void
$dp array
Résultat void