class Increment

Increment a value in the cache with all tag tracking.

Combines the ZADD NX operations for tag tracking with INCRBY in a single connection checkout for efficiency.

Uses ZADD NX (only add if not exists) to avoid overwriting existing tag entries that may have TTL information.

Constants

private FOREVER_SCORE

Score for increment operations (no TTL - persists until deleted).

Methods

__construct(StoreContext $context)

No description

int|false
execute(string $key, int $value, array $tagIds)

Execute the increment operation with tag tracking.

Details

at line 26
__construct(StoreContext $context)

No description

Parameters

StoreContext $context

at line 39
int|false execute(string $key, int $value, array $tagIds)

Execute the increment operation with tag tracking.

Parameters

string $key

The cache key (already namespaced by caller)

int $value

The value to increment by

array $tagIds

Array of tag identifiers

Return Value

int|false

The new value after incrementing, or false on failure