Cache management¶
Cache management defines reusable state, cache identity, validity, lifecycle, and eviction across AR and diffusion execution.
Candidate invariants¶
CACHE-INV-001: Cache identity is complete¶
Rule: A cache key MUST include every input and execution property that can change the reused value.
CACHE-INV-002: Reuse preserves correctness¶
Rule: A cache optimization MUST provide a disabled path and MUST NOT reuse state after its validity conditions change.
CACHE-INV-003: Ownership has an end¶
Rule: Request-scoped and model-scoped cache entries MUST have explicit reset, eviction, or teardown behavior.
Safe-change guide¶
Test hit, miss, invalidation, disabled, concurrent-request, and teardown paths.