Skip to main content

FanoutCache.cull()

Remove expired entries, then evict the least recently stored from each shard until it’s

Usage

Source

FanoutCache.cull(
    *,
    timeout=None,
    retry=False,
)

under its share of size_limit.

Parameters

timeout: Optional[float] = None

As for expire: one budget for the whole call.

retry: bool = False
On a Timeout, try again until the call gets through, each round with the whole timeout, a durable=True handle included. Only Timeout is retried.

Returns

int
How many entries were removed.

Raises

Timeout
As for expire, with removed and failed_shards.