Expand description
Two-table cache model: action records + content-addressed blobs.
Following Bazel’s action-cache/CAS split and Nectar’s data-computation duality:
- An action record (
ActionResult) is a small JSON document keyed by the computation’s provenance (crate::cache::CacheKey: config + state + input hashes). It names the output by content hash and carries the metadata GC needs (compute cost, size, provenance, timestamps). - A blob is the output’s bytes, stored once under its
ContentHash— identical outputs from different actions deduplicate automatically.
Because the record is tiny and the blob is regenerable (re-run the action), eviction can delete blobs while keeping records: a later run recomputes the value, re-fills the same content address, and every other record pointing at it becomes servable again. Eviction degrades performance, never correctness.
Structs§
- Action
Result - The record of one completed computation.
- Content
Hash - Address of a blob: the hash of its bytes.
Enums§
- Hash
Algo - Hash algorithm of a
ContentHash, self-describing (multihash lesson from IPFS: bake the algorithm into the address so a future migration needs no flag day).
Traits§
- Action
Cache - Store of action records (the small table).
- Blob
Store - Store of content-addressed blobs (the big table).