title: How do I insert/Delete from a cache data structure in O(1)?
body: <p>I have a key against which there will be a collection of items, And I have a global expiry configured from the user. And each item in the collection will have a Last used time.
  I want to design an O(1) complexity solution for the above problem for three operations.</p>
  <pre><code>Add(); // Adds item
  
  Get(); // Takes item
  
  RemoveExpired(); // This will be triggered from a timer on the cache, 
  //I need to call Remove on collections against each key which then will 
  //remove its own expired items. With my current solution, I am able to achieve O(n*m).
  </code></pre>