PHP Класс Nette\Caching\Storages\MemcachedStorage

Наследование: extends Nette\Object, implements Nette\Caching\IStorage
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( $host = 'localhost', $port = 11211, $prefix = '', Nette\Caching\Storages\IJournal $journal = NULL )
addServer ( $host = 'localhost', $port = 11211, $timeout = 1 )
clean ( array $conditions ) : void Removes items from the cache by conditions & garbage collector.
getConnection ( ) : Memcache
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.

Описание методов

__construct() публичный Метод

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

addServer() публичный Метод

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

clean() публичный Метод

Removes items from the cache by conditions & garbage collector.
public clean ( array $conditions ) : void
$conditions array
Результат void

getConnection() публичный Метод

public getConnection ( ) : Memcache
Результат Memcache

isAvailable() публичный статический Метод

Checks if Memcached extension is available.
public static isAvailable ( ) : boolean
Результат boolean

lock() публичный Метод

Prevents item reading and writing. Lock is released by write() or remove().
public lock ( $key ) : void
Результат void

read() публичный Метод

Read from cache.
public read ( $key ) : mixed | null
Результат mixed | null

remove() публичный Метод

Removes item from the cache.
public remove ( $key ) : void
Результат void

write() публичный Метод

Writes item into the cache.
public write ( $key, $data, array $dp ) : void
$dp array
Результат void