class Forget

Remove an item from the cache along with its tag membership.

A bare DEL would leave the key listed in its tag hashes; a later tag flush would then delete an unrelated new value written at the reused key. The registry is not touched because removing one key does not empty a tag; registry hygiene belongs to pruning.

Methods

__construct(StoreContext $context)

Create a new forget operation instance.

bool
execute(string $key)

Execute the forget (delete) operation.

string
forgetWithTagsScript()

Get the Lua script for deleting a value and its tag membership.

Details

at line 23
__construct(StoreContext $context)

Create a new forget operation instance.

Parameters

StoreContext $context

at line 31
bool execute(string $key)

Execute the forget (delete) operation.

Parameters

string $key

Return Value

bool

at line 91
protected string forgetWithTagsScript()

Get the Lua script for deleting a value and its tag membership.

KEYS[1] - The cache key (prefixed) KEYS[2] - The reverse index key ARGV[1] - Tag prefix for building tag hash keys ARGV[2] - Raw key (without prefix, for hash field name) ARGV[3] - Tag hash suffix (":entries")

Return Value

string