class MemcachedStorage 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
read(string $key)

Read from cache.

void
lock(string $key)

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

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

Writes item into the cache.

void
remove(string $key)

Removes item from the cache.

void
clean(array $conditions)

Removes items from the cache by conditions.

Details

at line 41
static bool isAvailable()

Checks if Memcached extension is available.

Return Value

bool

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

No description

Parameters

$host
$port
$prefix
IJournal $journal

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

No description

Parameters

$host
$port
$timeout

at line 74
Memcache getConnection()

No description

Return Value

Memcache

at line 80
mixed read(string $key)

Read from cache.

Parameters

string $key

Return Value

mixed

at line 109
void lock(string $key)

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

Parameters

string $key

Return Value

void

at line 114
void write(string $key, mixed $data, array $dp)

Writes item into the cache.

Parameters

string $key
mixed $data
array $dp

Return Value

void

at line 148
void remove(string $key)

Removes item from the cache.

Parameters

string $key

Return Value

void

at line 154
void clean(array $conditions)

Removes items from the cache by conditions.

Parameters

array $conditions

Return Value

void

Traits

SmartObject