Expand description
Machine-local forge state on the redb account_usage table: the
per-account usage cache, one row per account. Values are serde-json;
no field schema on disk.
Re-exportsΒ§
use std::collections::BTreeMap;πuse anyhow::Context;πuse redb::ReadableTable;πuse redb::TableDefinition;πuse super::Db;πuse crate::account_cache::CachedAccountUsage;π
ConstantsΒ§
- ACCOUNT_
USAGE π
FunctionsΒ§
- account_
usage - Every cached per-account usage snapshot, keyed by account display name. A record that fails to decode is skipped with a warn so one corrupt blob canβt wipe the rest of the cache.
- replace_
account_ usage - Overwrite the usage cache with
entries: clear every row then insert the full map in one write txn, mirroring the pollerβs whole-map write.