Supervised cache and bounded refresh scheduler for provider usage.
One task refreshes accounts sequentially. A second manual or automatic request cannot start another task while that refresh is active.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type scope() :: :all | {:account, integer()}
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec refresh_account(integer(), GenServer.server()) :: {:ok, :started | :already_refreshing}
@spec refresh_all(GenServer.server()) :: {:ok, :started | :already_refreshing}
@spec snapshots(GenServer.server()) :: [LLMProxy.ProviderUsage.Snapshot.t()]