Skip to main content

Module cache

Module cache 

Source
Expand description

Cache backend abstraction for LiveTable.

LiveTable only knows about Cache — concrete backends like MemCache, NoCache, or RedbCache plug in via this trait. The storage shape is key → CachedRows; keys are caller-supplied cache_key plus a per-page suffix produced by LiveTable. See DESIGN.md for the keying contract.

Structs§

CachedRows
A row set as stored in the cache, with the wall-clock instant the master fetch completed. Fetch time isn’t used in v1 (no TTL), but we keep it because every backend can provide it cheaply and it’s the obvious knob to add later.
MemCache
Thread-safe HashMap-backed cache. Cheap to clone — the inner state is Arc-shared.
NoCache
RedbCache
Redb-backed cache. Cheap to clone — the inner Arc<Database> is shared.

Traits§

Cache
Cache backend interface. Implementations must be safe to share across the read path, the write-queue worker, and the live-event consumer.