Back to problems

Auto-Expire Cache

Object-Oriented Programming · Netflix · Medium

Auto-Expiring Cache Problem Overview Create a key-value cache whose entries expire automatically after a caller-supplied lifetime. Build the design in stages, with each later part adding capabilities to the earlier version. Key Design Considerations API design: Decide on suitable method signatures, input and output types, and behavior at the boundaries. Expiration behavior: Determine when expired records are detected and removed. Memory usage: Prevent entries that have…

Checking your access…