class MemoryStorage extends Object implements IStorage

Memory cache storage.

Methods

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 $dependencies)

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 27
mixed|null read($key)

Read from cache.

Parameters

$key

Return Value

mixed|null

at line 38
void lock($key)

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

Parameters

$key

Return Value

void

at line 50
void write($key, $data, array $dependencies)

Writes item into the cache.

Parameters

$key
$data
array $dependencies

Return Value

void

at line 61
void remove($key)

Removes item from the cache.

Parameters

$key

Return Value

void

at line 72
void clean(array $conditions)

Removes items from the cache by conditions & garbage collector.

Parameters

array $conditions

Return Value

void