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 39
__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 60
get($key, $default = null)

{@inheritdoc}

Parameters

$key
$default

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

{@inheritdoc}

Parameters

$keys
$default

at line line 123
has($key)

{@inheritdoc}

Parameters

$key

at line line 137
clear()

{@inheritdoc}

at line line 152
delete($key)

{@inheritdoc}

Parameters

$key

at line line 167
deleteMultiple($keys)

{@inheritdoc}

Parameters

$keys

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

{@inheritdoc}

Parameters

$key
$value
$ttl

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

{@inheritdoc}

Parameters

$values
$ttl

at line line 229
bool prune()

Return Value

bool

at line line 245
reset()