class ChainCache implements CacheInterface

Chains several caches together.

Cached items are fetched from the first cache having them in its data store. They are saved and deleted in all caches at once.

Methods

__construct(array $caches, int $defaultLifetime)

No description

get($key, $default = null)

{@inheritdoc}

getMultiple($keys, $default = null)

{@inheritdoc}

has($key)

{@inheritdoc}

clear()

{@inheritdoc}

delete($key)

{@inheritdoc}

deleteMultiple($keys)

{@inheritdoc}

set($key, $value, $ttl = null)

{@inheritdoc}

setMultiple($values, $ttl = null)

{@inheritdoc}

Details

at line line 36
__construct(array $caches, int $defaultLifetime)

Parameters

array $caches The ordered list of caches used to fetch cached items
int $defaultLifetime The lifetime of items propagated from lower caches to upper ones

at line line 57
get($key, $default = null)

{@inheritdoc}

Parameters

$key
$default

at line line 79
getMultiple($keys, $default = null)

{@inheritdoc}

Parameters

$keys
$default

at line line 120
has($key)

{@inheritdoc}

Parameters

$key

at line line 134
clear()

{@inheritdoc}

at line line 149
delete($key)

{@inheritdoc}

Parameters

$key

at line line 164
deleteMultiple($keys)

{@inheritdoc}

Parameters

$keys

at line line 182
set($key, $value, $ttl = null)

{@inheritdoc}

Parameters

$key
$value
$ttl

at line line 197
setMultiple($values, $ttl = null)

{@inheritdoc}

Parameters

$values
$ttl