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.

Methods

__construct(array $adapters, int $defaultLifetime = 0)

No description

getItem($key)

{@inheritdoc}

getItems(array $keys = [])

{@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()

No description

reset()

No description

Details

at line 39
__construct(array $adapters, int $defaultLifetime = 0)

Parameters

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

at line 81
CacheItem getItem($key)

{@inheritdoc}

Parameters

$key

Return Value

CacheItem

at line 106
Traversable|CacheItem[] getItems(array $keys = [])

{@inheritdoc}

Parameters

array $keys

Return Value

Traversable|CacheItem[]

at line 145
hasItem($key)

{@inheritdoc}

Parameters

$key

at line 159
clear()

{@inheritdoc}

at line 174
deleteItem($key)

{@inheritdoc}

Parameters

$key

at line 189
deleteItems(array $keys)

{@inheritdoc}

Parameters

array $keys

at line 204
save(CacheItemInterface $item)

{@inheritdoc}

Parameters

CacheItemInterface $item

at line 219
saveDeferred(CacheItemInterface $item)

{@inheritdoc}

Parameters

CacheItemInterface $item

at line 234
commit()

{@inheritdoc}

at line 249
bool prune()

Return Value

bool

at line 265
reset()