Java Scenario-Based Interview Question 6: In-Memory Generic Cache

Question:
How would you design a thread-safe, generic in-memory cache with LRU eviction and TTL support?