VersionedTagSet
class VersionedTagSet extends NamespacedTagSet
Generic namespaced tag set for stores without a native tag index.
Each tag's identifier is a random value stored in the cache itself; resetting a tag rotates the identifier, which changes the namespace and lets previously tagged entries expire naturally.
Properties
| protected Store | $store | The cache store implementation. |
from TagSet |
| protected array | $names | The tag names. |
from TagSet |
Methods
Reset all tags in the set.
Flush all the tags in the set.
Get a unique namespace that changes when any of the tags are flushed.
Get an array of tag identifiers for all of the tags in the set.
Get the unique tag identifier for a given tag.
Get the tag identifier key for a given tag.
Reset the tag and return the new tag identifier.
Flush the tag from the cache.
Generate a new tag identifier.
Persist a tag identifier.
Details
in
TagSet at line 36
TagSet
withStore(Store $store)
Get a copy of the tag set that uses the given store.
at line 19
bool
reset()
Reset all tags in the set.
at line 42
bool
flush()
Flush all the tags in the set.
in
TagSet at line 62
protected bool
attemptEach(iterable $items, Closure $operation)
Attempt an operation for every item.
in
TagSet at line 91
array
getNames()
Get all of the tag names in the set.
in
NamespacedTagSet at line 18
string
getNamespace()
Get a unique namespace that changes when any of the tags are flushed.
in
NamespacedTagSet at line 28
array
tagIds()
Get an array of tag identifiers for all of the tags in the set.
at line 67
string
tagId(string $name)
Get the unique tag identifier for a given tag.
at line 75
string
tagKey(string $name)
Get the tag identifier key for a given tag.
at line 30
string
resetTag(string $name)
Reset the tag and return the new tag identifier.
at line 57
string
flushTag(string $name)
Flush the tag from the cache.
at line 83
protected string
newTagId()
Generate a new tag identifier.
at line 91
protected bool
writeTagId(string $name, string $id)
Persist a tag identifier.