I added a cache in my application with $ cacheFactory, but when the user closes the browser and then opens again, the cache data for the products viewed has expired.
Is there any way to do this longer? put an expiration date or something like that?
Thank.
Edit: I may have to use Breeze.js , but before that I wanted to know if you know if this can be done using angularjs (I read the API and there is no information about this: S).
Edit 2: to help, as I use $ cacheFactory, it looks like this JSFiddle code .
factory('SomeCache', function($cacheFactory) {
return $cacheFactory('someCache', {
capacity: 3
});
}).
Edit 3: Lawnchair is not an option; it is stored in a javascript array and does not save data after closing the browser.