Skip to main content

cache_namespace

Function cache_namespace 

Source
pub fn cache_namespace(spec: &PhraseSpec) -> String
Expand description

The persistent cache’s namespace for one stimulus: "e<epoch>:<spec hash>".

Two coordinates, because two independent things invalidate a stored row — the featurizer changing (RENDER_EPOCH) and the stimulus changing (the spec). The spec is folded into render_key as well, so this is redundant for correctness and useful for operations: it makes a whole stimulus’s rows a contiguous, droppable prefix instead of scattered keys that can only be evicted by trying them.