Technical Architecture & AI Engineering · 7 min read
Thread-Safe and Async LRU Cache With TTL Expiry
Build an O(1) LRU cache combining a HashMap and doubly-linked list with per-key TTL overrides, lazy expiry, async stampede protection, and hit-rate telemetry.
Question 1 of 3
During a peak traffic surge, your implementation of Code Design 2: Thread-Safe / Async LRU Cache with TTL experiences elevated P99 latency and upstream timeouts. What is the immediate engineering leadership action?
Question 2 of 3
When designing Code Design 2: Thread-Safe / Async LRU Cache with TTL, how should an engineering lead ensure zero data loss during network partitions?
Question 3 of 3
What is the most critical metric to monitor continuously in Code Design 2: Thread-Safe / Async LRU Cache with TTL to detect degradation before customers report outages?