Object-Oriented Programming · Databricks · Hard
Design an in-memory cache that will be embedded inside a single machine running a web service. The cache holds key-value pairs in RAM and is accessed concurrently by many worker threads that handle incoming requests. Your design must expose these three operations: Get(key) returns the value stored under key, or a sentinel indicating a miss. Put(key, value) inserts a new key-value pair, or replaces the value of an existing key. Delete(key) removes the entry for key and…
Checking your access…