TagKeyBuilder
class TagKeyBuilder
Builds Redis-internal tag storage key names.
The key formats here are Redis implementation details that were previously methods on the TagMode enum. Moved out so the enum stays purely semantic.
Methods
No description
Mode-only tag segment, for callers that don't have a prefix to hand (e.g. console tools that concatenate a cachePrefix externally).
Tag segment prefix: "_any:tag:" or "_all:tag:".
Tag identifier (without cache prefix): "_any:tag:{tagName}:entries".
Full tag key with cache prefix: "{prefix}_any:tag:{tagName}:entries".
Full reverse index key: "{prefix}{cacheKey}:_any:tags".
Full registry key: "{prefix}_any:tag:registry".
Details
at line 18
__construct(TagMode $mode, string $prefix)
No description
at line 28
static string
tagSegmentFor(TagMode $mode)
Mode-only tag segment, for callers that don't have a prefix to hand (e.g. console tools that concatenate a cachePrefix externally).
at line 36
string
tagSegment()
Tag segment prefix: "_any:tag:" or "_all:tag:".
at line 44
string
tagId(string $tagName)
Tag identifier (without cache prefix): "_any:tag:{tagName}:entries".
at line 52
string
tagKey(string $tagName)
Full tag key with cache prefix: "{prefix}_any:tag:{tagName}:entries".
at line 62
string
reverseIndexKey(string $cacheKey)
Full reverse index key: "{prefix}{cacheKey}:_any:tags".
Any mode uses this to track which tags a cache key belongs to.
at line 72
string
registryKey()
Full registry key: "{prefix}_any:tag:registry".
Any mode uses this as a sorted set of all active tags.