Skip to content

miniproto.invoke.MethodFloodWaitCache

MethodFloodWaitCache(max_entries: int, *, clock: Callable[[], float] = time.monotonic) -> None

Bounded client-local cache for Telegram’s method-scoped flood waits.

Create a bounded LRU cache using a monotonic clock.

Parameters:

  • max_entries (int) – Maximum number of method-level waits to retain; must be positive.
  • clock (Callable[[], float]) – Monotonic time source, injectable for deterministic tests.

Raises: