Design Thread-Safe Cache with TTL - Low-level design | OneNoughtOne