class Forever

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

Combines the ZADD operations for tag tracking with the SET for cache storage 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)

No description

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

Execute the forever operation with tag tracking.

Details

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

No description

Parameters

StoreContext $context
Serialization $serialization

at line 38
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