title: Is CacheFactory in angularjs a singleton?
body: <p>I've created a service using the CacheFactory. I was expecting it to be a singleton. I inject it into my controller and it works fine within the scope of the controller. But once I go to a different page with a different scope, I don't seem to have the values in the cache that I stored in the same controller in a different scope. Shouldn't the behavior of the CacheFactory be a singleton where I have those same cached objects everywhere I inject the CacheService?</p>
  
  <p>This is my service as an example:</p>
  
  <pre><code>angular.module('MyService', []).factory('CacheService', function($cacheFactory) {
          return $cacheFactory('cacheService', {
              capacity: 3 // optional - turns the cache into LRU cache
          })
      });
  </code></pre>
  
  <p>Then in my controller:</p>
  
  <pre><code>function MyController($scope, CacheService) {
     var results= CacheService.get('storedvalue');
     if(!results){
         CacheService.put('storedvalue', results);
        alert('results not stored');
     }
     else
        alert('results stored');
  }
  </code></pre>