Im using angular-cache library to cache my rest query to browser in AngularJS,
angular.module('fbc')
.service('OrganizationService', function (CacheFactory, $http) {
// Service logic
var settings,
organizationCache, baseURL = "https://api.myapp.com/1";
if (!CacheFactory.get('organizationCache')) {
// or CacheFactory('bookCache', { ... });
CacheFactory.createCache('organizationCache', {
deleteOnExpire: 'aggressive',
recycleFreq: 60000
});
console.log("No CacheFactory");
}
organizationCache = CacheFactory.get('organizationCache');
settings = {
cache: organizationCache
};
retu {
getAllOrganization: function (promise) {
retu $http.get(baseURL + '/Organization', settings)
.then(promise);
}
};
});
but every time I refresh the browser I can see No CacheFactory on my console it means it query every time and not using or their is no cache stored.
