class MemcachedStorage extends Object implements IStorage

Memcached storage.

Constants

internal META_CALLBACKS

internal META_DATA

internal META_DELTA

Methods

static bool
isAvailable()

Checks if Memcached extension is available.

__construct($host = 'localhost', $port = 11211, $prefix = '', IJournal $journal = NULL)

No description

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

No description

Memcache
getConnection()

No description

mixed|null
read($key)

Read from cache.

void
lock($key)

Prevents item reading and writing. Lock is released by write() or remove().

void
write($key, $data, array $dp)

Writes item into the cache.

void
remove($key)

Removes item from the cache.

void
clean(array $conditions)

Removes items from the cache by conditions & garbage collector.

Details

at line 38
static bool isAvailable()

Checks if Memcached extension is available.

Return Value

bool

at line 44
__construct($host = 'localhost', $port = 11211, $prefix = '', IJournal $journal = NULL)

No description

Parameters

$host
$port
$prefix
IJournal $journal

at line 59
addServer($host = 'localhost', $port = 11211, $timeout = 1)

No description

Parameters

$host
$port
$timeout

at line 71
Memcache getConnection()

No description

Return Value

Memcache

at line 82
mixed|null read($key)

Read from cache.

Parameters

$key

Return Value

mixed|null

at line 116
void lock($key)

Prevents item reading and writing. Lock is released by write() or remove().

Parameters

$key

Return Value

void

at line 128
void write($key, $data, array $dp)

Writes item into the cache.

Parameters

$key
$data
array $dp

Return Value

void

at line 167
void remove($key)

Removes item from the cache.

Parameters

$key

Return Value

void

at line 178
void clean(array $conditions)

Removes items from the cache by conditions & garbage collector.

Parameters

array $conditions

Return Value

void