class Forever

Store an item in the cache indefinitely with all tag tracking.

Combines SET cache storage with the ZADD tag tracking operations in a single connection checkout for efficiency.

Forever items use a score of -1 in the tag sorted sets, which prevents them from being cleaned by ZREMRANGEBYSCORE operations.

Constants

private FOREVER_SCORE

Methods

__construct(StoreContext $context, Serialization $serialization)

Create a new forever operation instance.

bool
execute(string $key, mixed $value, array $tagIds)

Execute the forever operation with tag tracking.

Details

at line 27
__construct(StoreContext $context, Serialization $serialization)

Create a new forever operation instance.

Parameters

StoreContext $context
Serialization $serialization

at line 41
bool execute(string $key, mixed $value, array $tagIds)

Execute the forever operation with tag tracking.

Parameters

string $key

The cache key (already namespaced by caller)

mixed $value

The value to store

array $tagIds

Array of tag identifiers (e.g., "_all:tag:users:entries")

Return Value

bool

True if successful