class TagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, PruneableInterface, ResettableInterface

Traits

An implementation of CacheInterface for PSR-6 CacheItemPoolInterface classes.

Constants

TAGS_PREFIX

Methods

prune()

{@inheritdoc}

reset()

{@inheritdoc}

get(string $key, callable $callback, float $beta = null, array $metadata = null)

{@inheritdoc}

bool
delete(string $key)

{@inheritdoc}

callable
setCallbackWrapper(callable|null $callbackWrapper)

Wraps the callback passed to ->get() in a callable.

__construct(AdapterInterface $itemsPool, AdapterInterface $tagsPool = null, float $knownTagVersionsTtl = 0.15)

No description

bool
invalidateTags(array $tags)

Invalidates cached items using tags.

hasItem($key)

{@inheritdoc}

getItem($key)

{@inheritdoc}

getItems(array $keys = [])

{@inheritdoc}

clear()

{@inheritdoc}

deleteItem($key)

{@inheritdoc}

deleteItems(array $keys)

{@inheritdoc}

save(CacheItemInterface $item)

{@inheritdoc}

saveDeferred(CacheItemInterface $item)

{@inheritdoc}

commit()

{@inheritdoc}

__destruct()

No description

Details

in ProxyTrait at line 29
prune()

{@inheritdoc}

in ProxyTrait at line 37
reset()

{@inheritdoc}

in CacheTrait at line 27
get(string $key, callable $callback, float $beta = null, array $metadata = null)

{@inheritdoc}

Parameters

string $key
callable $callback
float $beta
array $metadata

in CacheTrait at line 35
bool delete(string $key)

{@inheritdoc}

Parameters

string $key

Return Value

bool

in ContractsTrait at line 40
callable setCallbackWrapper(callable|null $callbackWrapper)

Wraps the callback passed to ->get() in a callable.

Parameters

callable|null $callbackWrapper

Return Value

callable the previous callback wrapper

at line 42
__construct(AdapterInterface $itemsPool, AdapterInterface $tagsPool = null, float $knownTagVersionsTtl = 0.15)

Parameters

AdapterInterface $itemsPool
AdapterInterface $tagsPool
float $knownTagVersionsTtl

at line 113
bool invalidateTags(array $tags)

Invalidates cached items using tags.

Parameters

array $tags An array of tags to invalidate

Return Value

bool True on success

Exceptions

InvalidArgumentException When $tags is not valid

at line 156
hasItem($key)

{@inheritdoc}

Parameters

$key

at line 180
CacheItem getItem($key)

{@inheritdoc}

Parameters

$key

Return Value

CacheItem

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

{@inheritdoc}

Parameters

array $keys

Return Value

Traversable|CacheItem[]

at line 218
clear()

{@inheritdoc}

at line 228
deleteItem($key)

{@inheritdoc}

Parameters

$key

at line 236
deleteItems(array $keys)

{@inheritdoc}

Parameters

array $keys

at line 250
save(CacheItemInterface $item)

{@inheritdoc}

Parameters

CacheItemInterface $item

at line 263
saveDeferred(CacheItemInterface $item)

{@inheritdoc}

Parameters

CacheItemInterface $item

at line 276
commit()

{@inheritdoc}

at line 281
__destruct()