title: Caching JSON Data in C# MVC3
body: <p>I am developing an application that presents a company's twitter feed on a Facebook application.  This is a large company with lots of traffic to the FB App so I need to cache the Twitter data I receive (from the twitter API) so that I can avoid their rate limits.</p>
  
  <p>In my code, I use LinqToTwitter to call the API and then I construct a string of JSON with the results.  That string is then fed to the user's browser via AJAX. </p>
  
  <p>The rate limit for Twitter API calls is 150 per hour, so I figure I will just place the string of JSON data I construct in a cache object and only refresh it once per minute leaving me well below the Twitter rate limit.</p>
  
  <p>The problem is that I am fairly new to MVC for .NET and can't seem to use System.Web.Caching like I could do in a webforms application.</p>
  
  <p>In older webforms apps I simply did something like:</p>
  
  <pre><code>            private string KeyTwitterData;
  
              ...
  
              string data = null;
              if (Cache[KeyTwitterData] == null)
              {
                  var url = LinqToTwitter.Request.Url;
                  data = ServiceMethods.GetConversation(url);
                  Cache.Insert(KeyTwitterData, data);
              }
              else
              {
                  data = (string)Cache[KeyTwitterData];
              }
  </code></pre>
  
  <p>Can someone please tell me how to accomplish this in MVC3?</p>
  
  <p>Thanks!</p>
  
  <p>Matt </p>