Goldman Sachs Interview Question

Implement cache where each element in cache have its own expiry time.