| Cache Caller | Serves a low-latency, disposable projection with authoritative fallback. In this design it participates in: Under one consistency boundary, find node in hash map. | Removes repeated work from the latency-critical path. It prevents the external caller from also owning the contract and failure behavior of Cache API. | Read authoritative storage for every request. Simpler initially, but latency and source-of-truth load scale together and a hot key becomes a database incident. Here that simpler choice would couple “TTL heap contains stale update entries” to the external caller. | Costs invalidation, staleness, stampede protection, and memory. Add or split it only after the workload (Millions ops/s · bounded entries · thread-safe option) proves repeated reads dominate. Measure the latency, saturation, lag, or mismatch at the Cache Caller boundary before extracting or scaling it. |
| Cache API | Owns authentication, validation, quotas, deadlines, and routing. In this design it participates in: If expired remove map/list/weight and return miss; otherwise move node to MRU. | Removes repeated work from the latency-critical path. It prevents Cache Caller from also owning the contract and failure behavior of Key Hash Map. | Read authoritative storage for every request. Simpler initially, but latency and source-of-truth load scale together and a hot key becomes a database incident. Here that simpler choice would couple “Eviction callback reenters cache” to Cache Caller. | Costs invalidation, staleness, stampede protection, and memory. Add or split it only after the workload (Millions ops/s · bounded entries · thread-safe option) proves repeated reads dominate. Measure the latency, saturation, lag, or mismatch at the Cache API boundary before extracting or scaling it. |
| Key Hash Map | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Put updates or inserts node, updates total weight, and links at head. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Cache API from also owning the contract and failure behavior of Entry Node. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Large value evicts entire working set” to Cache API. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Key Hash Map boundary before extracting or scaling it. |
| Entry Node | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Evict from tail until entry/byte capacity holds; notify outside the lock. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Key Hash Map from also owning the contract and failure behavior of Doubly Linked List. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Concurrent get races remove” to Key Hash Map. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Entry Node boundary before extracting or scaling it. |
| Doubly Linked List | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: compute_if_absent registers one in-flight loader so concurrent misses share result. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Entry Node from also owning the contract and failure behavior of Head / MRU. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Loader fails while callers wait” to Entry Node. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Doubly Linked List boundary before extracting or scaling it. |
| Head / MRU | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Under one consistency boundary, find node in hash map. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Doubly Linked List from also owning the contract and failure behavior of Tail / LRU. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “TTL heap contains stale update entries” to Doubly Linked List. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Head / MRU boundary before extracting or scaling it. |
| Tail / LRU | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: If expired remove map/list/weight and return miss; otherwise move node to MRU. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Head / MRU from also owning the contract and failure behavior of Capacity Accountant. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Eviction callback reenters cache” to Head / MRU. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Tail / LRU boundary before extracting or scaling it. |
| Capacity Accountant | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Put updates or inserts node, updates total weight, and links at head. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Tail / LRU from also owning the contract and failure behavior of TTL Min-Heap. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Large value evicts entire working set” to Tail / LRU. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Capacity Accountant boundary before extracting or scaling it. |
| TTL Min-Heap | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Evict from tail until entry/byte capacity holds; notify outside the lock. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Capacity Accountant from also owning the contract and failure behavior of Expiry Sweeper. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Concurrent get races remove” to Capacity Accountant. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the TTL Min-Heap boundary before extracting or scaling it. |
| Expiry Sweeper | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: compute_if_absent registers one in-flight loader so concurrent misses share result. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents TTL Min-Heap from also owning the contract and failure behavior of Loader Coalescer. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Loader fails while callers wait” to TTL Min-Heap. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Expiry Sweeper boundary before extracting or scaling it. |
| Loader Coalescer | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Under one consistency boundary, find node in hash map. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Expiry Sweeper from also owning the contract and failure behavior of Concurrency Lock. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “TTL heap contains stale update entries” to Expiry Sweeper. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Loader Coalescer boundary before extracting or scaling it. |
| Concurrency Lock | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: If expired remove map/list/weight and return miss; otherwise move node to MRU. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Loader Coalescer from also owning the contract and failure behavior of Eviction Listener. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Eviction callback reenters cache” to Loader Coalescer. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Concurrency Lock boundary before extracting or scaling it. |
| Eviction Listener | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Put updates or inserts node, updates total weight, and links at head. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Concurrency Lock from also owning the contract and failure behavior of Hit / Miss Metrics. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Large value evicts entire working set” to Concurrency Lock. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Eviction Listener boundary before extracting or scaling it. |
| Hit / Miss Metrics | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Evict from tail until entry/byte capacity holds; notify outside the lock. | Proves correctness and supports controlled recovery. It prevents Eviction Listener from also owning the contract and failure behavior of operators and repair tooling. | Infer correctness from request logs. Logs do not prove durable business state, detect silent drift, or safely repair ambiguous outcomes. Here that simpler choice would couple “Concurrent get races remove” to Eviction Listener. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Hit / Miss Metrics boundary before extracting or scaling it. |