title: Issue using HttpRuntime.Cache
body: <p>Am using following .net code to add objects to cache:</p>
  
  <pre><code>public static void Add&lt;T&gt;(string key, T dataToCache)
  {
      try
      {
          ApplicationLog.Instance.WriteInfoFormat("Inserting item with key {0} into Cache...", key);
  
          HttpRuntime.Cache.Insert(
              key,
              dataToCache,
              null,
              DateTime.Now.AddDays(7),
              System.Web.Caching.Cache.NoSlidingExpiration);
      }
  
      catch (Exception ex)
      {
          ApplicationLog.Instance.WriteException(ex);             
      }
  }
  </code></pre>
  
  <p>and here is my code to retrieve values from cache:</p>
  
  <pre><code>public static T Get&lt;T&gt;(string key) 
  {   
      try
      {                
          if (Exists(key))
          {
              ApplicationLog.Instance.WriteInfoFormat("Retrieving item with key {0} from Cache...", key);
  
              return (T)HttpRuntime.Cache[key];
          }
          else
          {
              ApplicationLog.Instance.WriteInfoFormat("Item with key {0} does not exist in Cache.", key);
              return default(T); 
          }
      }
      catch(Exception ex)
      {
          ApplicationLog.Instance.WriteException(ex);
          return default(T); 
      }
  }
  
  
  public static bool Exists(string key)
  {
      bool retVal = false;
      try
      {
          retVal= HttpRuntime.Cache[key] != null;
      }
      catch (Exception ex)
      {
          ApplicationLog.Instance.WriteException(ex);
      }
      return retVal; 
  }
  </code></pre>
  
  <p>But i find that after every 2 minutes or so,the cached object value is getting set to null resulting in pulling that value from database again.</p>
  
  <p>What am i missing here?</p>