class FlushStale

Flushes stale entries from tag sorted sets.

Uses ZREMRANGEBYSCORE to remove entries whose TTL timestamps have passed. This is a cleanup operation that can be called on specific tags via Cache::tags(['users'])->flushStale() or globally via the prune command.

Entries with score -1 (forever items) are never flushed.

Methods

__construct(StoreContext $context)

No description

void
execute(array $tagIds)

Flush stale entries from the given tag sorted sets.

Details

at line 23
__construct(StoreContext $context)

No description

Parameters

StoreContext $context

at line 39
void execute(array $tagIds)

Flush stale entries from the given tag sorted sets.

Removes entries with TTL scores between 0 and current timestamp. Entries with score -1 (forever items) are not affected.

In cluster mode, uses sequential commands since RedisCluster doesn't support pipeline mode and tags may be in different slots.

Parameters

array $tagIds

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

Return Value

void