Expand description
Cache lifecycle management: freshness check, rebuild trigger, fallback.
CacheManager is the primary entry point for loading events. It
transparently picks the fastest available source:
- Binary cache — if fresh (fingerprint matches), decode directly.
- TSJSON fallback — parse the event shards, then rebuild the cache so the next load is fast.
§Freshness fingerprint
A “fingerprint” is a fast hash over the list of shard files and their sizes + modification times. If any shard is added, removed, or modified, the fingerprint changes and the cache is considered stale.
The fingerprint is stored as the created_at_us field of the cache
header (repurposed — the actual wall-clock creation time is not critical).
This avoids adding a separate metadata file.
Structs§
- Cache
Manager - Manages cache lifecycle: freshness check, rebuild, and fallback to TSJSON.
- Load
Result - Result of a
CacheManager::load_eventscall, including provenance metadata for diagnostics.
Enums§
- Load
Source - Where events were loaded from.