class ChainAdapter implements AdapterInterface, PruneableInterface, ResettableInterface
Chains several adapters together.
Cached items are fetched from the first adapter having them in its data store. They are saved and deleted in all adapters at once.
__construct(array $adapters, int $defaultLifetime = 0) | ||
CacheItem | getItem($key) {@inheritdoc} | |
Traversable|CacheItem[] | getItems(array $keys = array()) {@inheritdoc} | |
hasItem($key) {@inheritdoc} | ||
clear() {@inheritdoc} | ||
deleteItem($key) {@inheritdoc} | ||
deleteItems(array $keys) {@inheritdoc} | ||
save(CacheItemInterface $item) {@inheritdoc} | ||
saveDeferred(CacheItemInterface $item) {@inheritdoc} | ||
commit() {@inheritdoc} | ||
bool | prune() | |
reset() |
array | $adapters | The ordered list of adapters used to fetch cached items |
int | $defaultLifetime | The default lifetime of items propagated from lower adapters to upper ones |
{@inheritdoc}
$key |
CacheItem |
{@inheritdoc}
array | $keys |
Traversable|CacheItem[] |
{@inheritdoc}
$key |
{@inheritdoc}
{@inheritdoc}
$key |
{@inheritdoc}
array | $keys |
{@inheritdoc}
CacheItemInterface | $item |
{@inheritdoc}
CacheItemInterface | $item |
{@inheritdoc}
bool |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Cache/Adapter/ChainAdapter.html