Expand description
Proof Caching Layer
Caches proof results keyed by (goal_hash, kb_version) to avoid redundant
inference. Supports LFU-style eviction (lowest access_count first) and
TTL-based expiry.
§Design
- Linear scan over a
Vec<CachedProof>(suitable for small caches ≤ 256). - LFU eviction: when at capacity, the entry with the lowest
access_countis removed to make room for a new entry. - TTL: entries are considered stale if
now_secs - cached_at_secs >= ttl_secs. - Optional invalidation on KB version change via
invalidate_on_kb_change.
Structs§
- Cached
Proof - A single cached proof result together with its bookkeeping metadata.
- Proof
Cache Config - Configuration for
ProofCachingLayer. - Proof
Cache Key - Composite key for a cached proof: goal identity × KB version.
- Proof
Cache Stats - Cumulative statistics for a
ProofCachingLayer. - Proof
Caching Layer - An LFU-evicting, TTL-expiring cache for proof results.
Functions§
- fnv1a_
hash - Compute the FNV-1a hash of a string.