title: Pros/Cons of different ASP.NET Caching Options
body: <p>I recently asked a question about caching application data in an ASP.NET MVC WebAPI application and it led me to a new question. What are the pros/cons of different caching methods available in ASP.NET?</p>
  
  <p>I have come upon:</p>
  
  <ul>
  <li><p>Memory Cache</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/system.runtime.caching.memorycache.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/system.runtime.caching.memorycache.aspx</a></p></li>
  <li><p>Using Static Member Variables:</p>
  
  <pre><code>private static Northwind.SuppliersDataTable suppliers = null;
  </code></pre></li>
  <li><p>Application State:</p>
  
  <pre><code> HttpContext.Current.Application["key"] ="Value"
  </code></pre></li>
  <li><p>Data Cache:</p>
  
  <pre><code>HttpRuntime.Cache.Insert(
    /* key */                "key", 
    /* value */              "value", 
    /* dependencies */       null, 
    /* absoluteExpiration */ Cache.NoAbsoluteExpiration, 
    /* slidingExpiration */  Cache.NoSlidingExpiration, 
    /* priority */           CacheItemPriority.NotRemovable, 
    /* onRemoveCallback */   null);
  </code></pre></li>
  </ul>
  
  <p>I am sure there are others, and I know they all technically store the data in memory...so any idea what I should use for an ASP.NET MVC webapi?</p>
  
  <p>My Previous Question:
  <a href="https://stackoverflow.com/questions/18937545/caching-application-data-in-memory-mvc-web-api">Caching application data in memory: MVC Web API</a></p>