Skip to main content

derive_cache_key

Function derive_cache_key 

Source
pub fn derive_cache_key(
    format: &EvalCacheFormat,
    inputs: &CacheKeyInputs,
) -> Result<String, SpecError>
Expand description

Derive a cache key for an evaluation. M3.0 uses hex of sha256 (or blake3) of a canonical text serialisation of the inputs. The resulting key is what the cache database indexes by.

Format-specific:

  • sha256 → 64-char lowercase hex.
  • blake3 → 64-char lowercase hex (BLAKE3 produces 32 bytes like sha256, conveniently).

§Errors

Returns no error today; the signature is Result to keep room for M3.1 (when the impure-env may need decryption etc.).