class Put

Store an item in the cache with all tag tracking.

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

Each tag maintains a sorted set where:

  • Members are cache keys (namespaced)
  • Scores are TTL timestamps (when the entry expires)

Methods

__construct(StoreContext $context, Serialization $serialization)

No description

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

Execute the put operation with tag tracking.

Details

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

No description

Parameters

StoreContext $context
Serialization $serialization

at line 40
bool execute(string $key, mixed $value, int $seconds, array $tagIds)

Execute the put operation with tag tracking.

Parameters

string $key

The cache key (already namespaced by caller)

mixed $value

The value to store

int $seconds

TTL in seconds

array $tagIds

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

Return Value

bool

True if successful