project · Level 2 · 35 min
Design a simple cache with get(key), set(key, value), and optional TTL. Evict expired entries or use a max size (e.g. LRU).
In-memory. No Redis.
Cache implementation and a short note on when you would use a distributed cache.