class Prune

Prune stale and orphaned entries from all-mode tag sorted sets.

Forever items use a negative score, so expiry pruning preserves them.

Constants

private DEFAULT_SCAN_COUNT

Default number of keys to process per SCAN iteration.

Methods

__construct(StoreContext $context)

Create a new prune operation instance.

array
execute(int $scanCount = self::DEFAULT_SCAN_COUNT)

Execute the prune operation.

string
removeOrphanedMembersScript()

Remove members only while their corresponding cache keys are absent.

Details

at line 26
__construct(StoreContext $context)

Create a new prune operation instance.

Parameters

StoreContext $context

at line 40
array execute(int $scanCount = self::DEFAULT_SCAN_COUNT)

Execute the prune operation.

The empty_sets_deleted statistic includes sets found already empty or absent. Redis deletes a sorted set automatically with its final member.

Parameters

int $scanCount

Number of keys per SCAN/ZSCAN iteration

Return Value

array

at line 181
protected string removeOrphanedMembersScript()

Remove members only while their corresponding cache keys are absent.

Return Value

string