title: How to cache .NET Web API requests (& use w/ AngularJS $http)
body: <p>I have a Web API written in ASP.NET that I'm consuming via AngularJS <code>$http</code>. </p>
  
  <p>I have enabled caching in my AngularJS factory as follows but every request still returns a response of <code>200</code>, never <code>200 (from cache)</code> or <code>304</code> (and by every request I mean making the same web api request numerous times on the same page, revisiting a page I've already visited that contains a Web API request, refreshing said page etc).</p>
  
  <pre><code>angular.module('mapModule')
      .factory('GoogleMapService', ['$http', function ($http) {
           var googleMapService = {               
              getTags: function () {
                  // $http returns a promise, which has a 'then' function, which also returns a promise
                  return $http({ cache: true, dataType: 'json', url: '/api/map/GetTags', method: 'GET', data: '' })
                  .then(function (response) {                     
                      return response.data;
                  });
              };
  
          return googleMapService;
      }]);
  </code></pre>
  
  <p>Am I missing something from the AngularJS side of things? Or is this a Web API problem. Or both?</p>