Expand description
Content-addressed derived-index cache (ADR-099/ADR-112) — port of
services/derived_cache.py DerivedIndexCache.load_or_build plus the
stat-manifest freshness rungs of services/freshness.py the one-shot
path consumes (INDEX-PLAN B3).
Every failure mode degrades to a fresh build: enabling the cache can only change latency, never an answer or an exit code (ADR-080).
Structs§
Enums§
- Read
Model - What
load_or_buildreturns: a memory-mapped store view (the warm path), or the freshly built structures when the store could not be written or reopened (ADR-080 — never a failure).
Constants§
Functions§
- cache_
enabled - Whether the persistent cache is active for this invocation (ADR-112):
on by default;
--no-cacheper invocation, non-emptyDECIDED_NO_CACHEenvironment-wide. - corpus_
hash_ from_ complete_ manifest - Recompose the corpus hash from a complete scan-order manifest without a
second filesystem walk.
stat_scanalways returns exactly this shape. - corpus_
hash_ from_ manifest - Reproduce
corpus_content_hashfrom the manifest’s cached hashes. - default_
cache_ dir - The derived-cache directory ladder:
DECIDED_CACHE_DIR>$XDG_CACHE_HOME/decisions/derived>~/.cache/decisions/derived><tmp>/decided-cache/decisions/derived(the homeless floor — never raises). - stat_
scan - Diff the corpus against
prev_manifestby stat, content-confirming changes. Returns the rebuilt manifest (scan order) and the changed set. - write_
marker_ public - The tracker’s compaction gate (INDEX-PLAN B6): write the marker for an already-landed store.