This question evaluates a candidate's skills in single-node cache design, including in-memory key/value storage, eviction policy management (e.g., LRU), durability considerations, concurrency control, and techniques for reducing contention such as sharding or striping.
Design a single-machine cache used by a web service to handle read/write requests.
The cache should:
Get(key)
,
Put(key, value)
,
Delete(key)
The interviewer expects: