class PutMany

Store multiple items in the cache with all tag tracking.

Combines SETEX for each cache value with ZADD operations for all keys and tags in a single pipeline for efficiency.

Methods

__construct(StoreContext $context, Serialization $serialization)

Create a new put-many operation instance.

bool
execute(array $values, int $seconds, array $tagIds, string $namespace)

Execute the putMany operation with tag tracking.

Details

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

Create a new put-many operation instance.

Parameters

StoreContext $context
Serialization $serialization

at line 37
bool execute(array $values, int $seconds, array $tagIds, string $namespace)

Execute the putMany operation with tag tracking.

Parameters

array $values

Key-value pairs (keys already namespaced)

int $seconds

TTL in seconds; values below one are stored for one second

array $tagIds

Array of tag identifiers

string $namespace

The namespace prefix for keys (for building namespaced keys)

Return Value

bool

True if all operations successful