class MemcachedStore implements StoreInterface

MemcachedStore is a StoreInterface implementation using Memcached as store engine.

Methods

static 
isSupported()

No description

__construct(Memcached $memcached, int $initialTtl = 300)

No description

save(Key $key)

Stores the resource if it's not locked by someone else.

waitAndSave(Key $key)

Waits until a key becomes free, then stores the resource.

putOffExpiration(Key $key, $ttl)

Extends the ttl of a resource.

delete(Key $key)

Removes a resource from the storage.

bool
exists(Key $key)

Returns whether or not the resource exists in the storage.

Details

at line 32
static isSupported()

at line 41
__construct(Memcached $memcached, int $initialTtl = 300)

Parameters

Memcached $memcached
int $initialTtl the expiration delay of locks in seconds

at line 58
save(Key $key)

Stores the resource if it's not locked by someone else.

Parameters

Key $key

Exceptions

LockConflictedException

at line 72
waitAndSave(Key $key)

Waits until a key becomes free, then stores the resource.

If the store does not support this feature it should throw a NotSupportedException.

at line 80
putOffExpiration(Key $key, $ttl)

Extends the ttl of a resource.

If the store does not support this feature it should throw a NotSupportedException.

Parameters

Key $key
$ttl

Exceptions

LockConflictedException
NotSupportedException

at line 121
delete(Key $key)

Removes a resource from the storage.

Parameters

Key $key

at line 145
bool exists(Key $key)

Returns whether or not the resource exists in the storage.

Parameters

Key $key

Return Value

bool