title: Data Structure for caching (Key = DateTime, Value = decimal)
body: <p>I have a function which calculates employee hours in a day. But, it's  slow because it considers carry hours and other things.</p>
  
  <p>I figure I can optimize this by caching the hours in a day and only update on change.</p>
  
  <p>I'm looking for something that can quickly do:</p>
  
  <pre><code>Set(date,hours)
  HasHoursFor(date)
  GetHoursFor(date)
  </code></pre>
  
  <p>What should I use for this?</p>
  
  <p>I could use a <code>Dictionary</code>, but I am wondering if there is not some sort of hash way to set, get, and contains quickly.</p>