title: angularjs not caching resource data . ( even after using cacheFactory )
body: <p>I am trying to cache the response with angularjs but its not happening .</p>
  
  <p>code #1</p>
  
  <pre><code>var app = angular.module("jsonService", ["ngResource"]);
  
  app.factory("JsonFactory", function($resource,$cacheFactory) {
      var cache = $cacheFactory('JsonFactory');
  
      var url = "myurl?domain=:tabUrl";
  
      var data = cache.get(url);
  
      if (data==undefined) {
      var retObj = $resource(url, {}, {
          list: {
              method: "GET",
              cache: true
          }
      });
      data = retObj;
      cache.put(url, data);
      };
      return cache.get(url);
  });
  </code></pre>
  
  <p>code #2</p>
  
  <pre><code>var app = angular.module("jsonService", ["ngResource"]);
  
  app.factory("JsonFactory", function($resource) {
  
      var url = "myurl?domain=:tabUrl";
      console.log(url);
  
      var retObj = $resource(url, {}, {
          list: {
              method: "GET",
              cache: true
          }
      });
      return retObj;
  });
  </code></pre>
  
  <p>after both the code i wrote . when looking in to dev tools there always goes a XHR request in Network tab.</p>
  
  <p>obviously : date does not changes . ( that's the whole point of caching ) </p>