AnyTagSet
class AnyTagSet extends TagSet
Any-mode tag set for Redis 8.0+ enhanced tagging.
Tags are identified by their names, and hashes track membership with HSETEX field expiration. Flush deletes the actual cache keys written with any of the specified tags.
Properties
| protected RedisStore | $store | The cache store implementation. |
|
| protected array | $names | The tag names. |
from TagSet |
Methods
Reset the tag set.
Flush all tags in this set.
Get the hash key for a tag.
Flush a single tag.
Get the store as a RedisStore instance.
Details
at line 31
__construct(Store $store, array $names = [])
Create a new AnyTagSet instance.
at line 73
void
reset()
Reset the tag set.
In any mode, this deletes the cached items themselves, unlike namespaced tag sets where reset only invalidates tag tracking.
at line 84
void
flush()
Flush all tags in this set.
Deletes all cache items that have ANY of the specified tags (union semantics), along with their reverse indexes and tag hashes.
in
TagSet at line 43
array
getNames()
Get all of the tag names in the set.
at line 42
string
tagHashKey(string $name)
Get the hash key for a tag.
Delegates to StoreContext which delegates to TagMode (single source of truth). Format: "{prefix}_any:tag:{tag}:entries"
at line 53
Generator
entries()
Get all cache keys for this tag set (union of all tags).
This is a generator that yields unique keys across all tags. Used for listing tagged items or bulk operations.
at line 92
string
flushTag(string $name)
Flush a single tag.
at line 102
protected RedisStore
getRedisStore()
Get the store as a RedisStore instance.