{
 "library": "bootstrap",
 "version": "0.11.0",
 "root": "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5",
 "license": null,
 "slug": "Cache",
 "ref": "Cache#465f",
 "hash": "sema:Cache#mh:SHA-256:465f391fb70426b0ec99c724ecf5db549d4f2e8124c821530271124aa10e17f3",
 "stub": "465f",
 "layer": "Infrastructure",
 "type": "Data Structures",
 "summary": "Keyed storage for reusing previously obtained values",
 "mechanism": "A temporary keyed storage layer for keeping frequently accessed Datum#f904 or State#4f25 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."
 ],
 "parameters": {},
 "signature": [],
 "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."
 ],
 "domain": "",
 "caution": "",
 "sources": [],
 "name": "Cache",
 "builds_on": [
  {
   "alias": "state",
   "relation": "references",
   "library": "bootstrap",
   "slug": "State",
   "ref": "State#4f25",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/State"
  },
  {
   "alias": "datum",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Datum",
   "ref": "Datum#f904",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Datum"
  }
 ],
 "related": [],
 "used_by": [
  {
   "slug": "HeuristicSnap",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/HeuristicSnap"
  },
  {
   "slug": "IdempotentWrite",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/IdempotentWrite"
  },
  {
   "slug": "PathwayMemory",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/PathwayMemory"
  }
 ],
 "url": "https://semahash.org/vocabularies/bootstrap/patterns/Cache",
 "md_url": "https://semahash.org/vocabularies/bootstrap/patterns/Cache.md",
 "library_url": "https://semahash.org/vocabularies/bootstrap"
}
