Key-value store with expiry
You're given 15 minutes to design a key-value store whose values carry an expiry time. set(key, value, ttl) and get(key) must never hand back an expired value, and starting with UserDefaults is fine. How would you design it?