ChainCache

ChainCache

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

__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

get($key, $default = null)

{@inheritdoc}

Parameters

$key
$default

getMultiple($keys, $default = null)

{@inheritdoc}

Parameters

$keys
$default

has($key)

{@inheritdoc}

Parameters

$key

clear()

{@inheritdoc}

delete($key)

{@inheritdoc}

Parameters

$key

deleteMultiple($keys)

{@inheritdoc}

Parameters

$keys

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

{@inheritdoc}

Parameters

$key
$value
$ttl

setMultiple($values, $ttl = null)

{@inheritdoc}

Parameters

$values
$ttl

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/Cache/Simple/ChainCache.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部