Low-Level DesignReported in a candidate post, Jul 2025
Design a multilevel key-value cache with pluggable eviction
Filed under PhonePe
The question
Implement a cache with up to a configured number of levels (L1 on top), each with a fixed capacity, String keys and values. Reads go level by level and promote a hit into L1; writes evict a pair from a full level into the next, adding a new level if the last is full; delete removes the key from all levels. Eviction must be pluggable, implemented as LFU.
No write-up yet. Related questions below have one.
Related PhonePe questions
Collected from public candidate posts and coding forums. Updated Nov 2026.