class ChainCache implements CacheInterface, PruneableInterface, ResettableInterface

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}

bool
prune()

No description

reset()

No description

Details

at line line 38
__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 59
get($key, $default = null)

{@inheritdoc}

Parameters

$key
$default

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

{@inheritdoc}

Parameters

$keys
$default

at line line 122
has($key)

{@inheritdoc}

Parameters

$key

at line line 136
clear()

{@inheritdoc}

at line line 151
delete($key)

{@inheritdoc}

Parameters

$key

at line line 166
deleteMultiple($keys)

{@inheritdoc}

Parameters

$keys

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

{@inheritdoc}

Parameters

$key
$value
$ttl

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

{@inheritdoc}

Parameters

$values
$ttl

at line line 228
bool prune()

Return Value

bool

at line line 244
reset()