Cache
Keyed storage for reusing previously obtained values
Mechanism
A temporary keyed storage layer for keeping frequently accessed Datum or State alongside the inputs that produced them, so repeat lookups bypass re-computation. Read-through, write-behind, and invalidation discipline are descendant concerns; the foundation is the keyed lookup that returns a stored value if present.
Invariants
- Consistency: Cache(Key) == Source(Key) if valid.
- Freshness: Expired items must not be returned.
Preconditions
- Key is hashable
- Value is serializable
Postconditions
- On a cache hit, the stored value for the requested key is returned without requiring recomputation.
Failure modes
- Staleness: Serving outdated data after the source has changed.
- Thrashing: Frequent evictions due to insufficient size.
Where this came from
—
Builds on
Used by
- HeuristicSnap references
- IdempotentWrite references
- PathwayMemory references
Identity
- Ref:
Cache#465f - Hash: sema:Cache#mh:SHA-256:465f391fb70426b0ec99c724ecf5db549d4f2e8124c821530271124aa10e17f3
- Library: bootstrap 0.11.0, root a6a3d1ff0f98
- License: Not stated; check the repository