Design: Cache Eviction Policy System
Design focuses on the eviction policy mechanism within a cache system. Cache storage, network communication, and persistence are out of scope.
Functional Requirements
Non-Functional Requirements
+---------------------+
| Client Requests |
+----------+----------+
|
v
+---------------------+
| Cache Interface |
+----------+----------+
|
v
+---------------------+ +---------------------+
| Eviction Policy Mgr |<----->| Metrics Collector |
+----------+----------+ +---------------------+
|
v
+---------------------+
| Cache Storage |
| (HashMap + LRU/LFU) |
+---------------------+
|
v
+---------------------+
| TTL Scheduler |
+---------------------+Pass the test and this pattern moves unknown