TagAwareAdapter
in package
implements
TagAwareAdapterInterface, TagAwareCacheInterface, PruneableInterface, ResettableInterface
Uses
ProxyTrait, ContractsTrait
Tags
Interfaces, Classes, Traits and Enums
- TagAwareAdapterInterface
- Interface for invalidating cached items using tags.
- TagAwareCacheInterface
- Allows invalidating cached items using tags.
- PruneableInterface
- Interface extends psr-6 and psr-16 caches to allow for pruning (deletion) of all expired cache items.
- ResettableInterface
- Resets a pool's local state.
Table of Contents
- TAGS_PREFIX = "\x00tags\x00"
- $createCacheItem : mixed
- $deferred : mixed
- $getTagsByKey : mixed
- $invalidateTags : mixed
- $knownTagVersions : mixed
- $knownTagVersionsTtl : mixed
- $setCacheItemTags : mixed
- $tags : mixed
- __construct() : mixed
- __destruct() : mixed
- __sleep() : mixed
- __wakeup() : mixed
- clear() : bool
- {@inheritdoc}
- commit() : bool
- {@inheritdoc}
- deleteItem() : bool
- {@inheritdoc}
- deleteItems() : bool
- {@inheritdoc}
- getItem() : mixed
- {@inheritdoc}
- getItems() : mixed
- {@inheritdoc}
- hasItem() : bool
- {@inheritdoc}
- invalidateTags() : bool
- Invalidates cached items using tags.
- save() : bool
- {@inheritdoc}
- saveDeferred() : bool
- {@inheritdoc}
- generateItems() : mixed
- getTagVersions() : mixed
Constants
TAGS_PREFIX
public
mixed
TAGS_PREFIX
= "\x00tags\x00"
Properties
$createCacheItem
private
mixed
$createCacheItem
$deferred
private
mixed
$deferred
= []
$getTagsByKey
private
mixed
$getTagsByKey
$invalidateTags
private
mixed
$invalidateTags
$knownTagVersions
private
mixed
$knownTagVersions
= []
$knownTagVersionsTtl
private
mixed
$knownTagVersionsTtl
$setCacheItemTags
private
mixed
$setCacheItemTags
$tags
private
mixed
$tags
Methods
__construct()
public
__construct(AdapterInterface $itemsPool[, AdapterInterface $tagsPool = null ][, float $knownTagVersionsTtl = 0.15 ]) : mixed
Parameters
- $itemsPool : AdapterInterface
- $tagsPool : AdapterInterface = null
- $knownTagVersionsTtl : float = 0.15
Return values
mixed —__destruct()
public
__destruct() : mixed
Return values
mixed —__sleep()
public
__sleep() : mixed
Return values
mixed —__wakeup()
public
__wakeup() : mixed
Return values
mixed —clear()
{@inheritdoc}
public
clear([string $prefix = '' ]) : bool
Parameters
- $prefix : string = ''
Return values
bool —commit()
{@inheritdoc}
public
commit() : bool
Return values
bool —deleteItem()
{@inheritdoc}
public
deleteItem(mixed $key) : bool
Parameters
- $key : mixed
Return values
bool —deleteItems()
{@inheritdoc}
public
deleteItems(array<string|int, mixed> $keys) : bool
Parameters
- $keys : array<string|int, mixed>
Return values
bool —getItem()
{@inheritdoc}
public
getItem(mixed $key) : mixed
Parameters
- $key : mixed
Return values
mixed —getItems()
{@inheritdoc}
public
getItems([array<string|int, mixed> $keys = [] ]) : mixed
Parameters
- $keys : array<string|int, mixed> = []
Return values
mixed —hasItem()
{@inheritdoc}
public
hasItem(mixed $key) : bool
Parameters
- $key : mixed
Return values
bool —invalidateTags()
Invalidates cached items using tags.
public
invalidateTags(array<string|int, mixed> $tags) : bool
Parameters
- $tags : array<string|int, mixed>
-
An array of tags to invalidate
Return values
bool —True on success
save()
{@inheritdoc}
public
save(CacheItemInterface $item) : bool
Parameters
- $item : CacheItemInterface
Return values
bool —saveDeferred()
{@inheritdoc}
public
saveDeferred(CacheItemInterface $item) : bool
Parameters
- $item : CacheItemInterface
Return values
bool —generateItems()
private
generateItems(iteratable<string|int, mixed> $items, array<string|int, mixed> $tagKeys) : mixed
Parameters
- $items : iteratable<string|int, mixed>
- $tagKeys : array<string|int, mixed>
Return values
mixed —getTagVersions()
private
getTagVersions(array<string|int, mixed> $tagsByKey[, array<string|int, mixed> &$invalidatedTags = [] ]) : mixed
Parameters
- $tagsByKey : array<string|int, mixed>
- $invalidatedTags : array<string|int, mixed> = []