Skip to main content

Module action

Module action 

Source
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§

ActionResult
The record of one completed computation.
ContentHash
Address of a blob: the hash of its bytes.

Enums§

HashAlgo
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§

ActionCache
Store of action records (the small table).
BlobStore
Store of content-addressed blobs (the big table).