Expand description
Pluggable caching for fetched provider results.
CacheBackend is the trait host apps implement to plug in tier-1 storage
(default MemoryBackend is in-process), tier-2 storage (IndexedDbBackend
lands in phase 3b), or anything else they like (Redis, file-system, etc.).
CachedEntry carries the DataTable, the wall-clock time it was fetched,
the TTL, free-form bulk-invalidation tags, and provider metadata so
cache-hits return identical metadata to the original fetch.
Structs§
- Cached
Entry - One cached source entry. Cloning is cheap because
DataTableisArc-backed; metadata + tag clones are a smallHashMap/Vec. - Memory
Backend - Default in-process tier-1 cache.
Arc<Mutex<HashMap<u64, CachedEntry>>>— no async I/O, no external dependencies, identical behavior on native and WASM.
Enums§
- Cache
Error - Cache backend errors. Backed by
thiserrorso backends can wrap their native error type (Mutexpoisoning, IndexedDB errors, IO errors, etc.).
Traits§
- Cache
Backend - Pluggable cache backend trait.
?Sendon WASM mirrors theDataSourceProvider/TransformMiddlewarestory so single-threaded browser environments don’t needSendbounds.