Skip to main content

FanoutCache.clear()

Remove every entry that existed when the call started, from every shard.

Usage

Source

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

Every shard’s starting point is taken before anything is removed, so writes that land while it runs, on any shard, are kept, as on Cache.clear.

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.