Jason Dobry
Jason Dobry
You need to make angular-cache a dependency of your module, e.g. ``` js angular.module('testApp', ['angular-cache']) .run(['CacheFactory', function (CacheFactory) { // ... }]); ```
`cacheFlushInterval` delete everything in the cache at once, on an interval. `maxAge` represents how long individual items can be in the cache until their expire. The cache's behavior toward expired...
I guess angular-cache should be update to work with the latest versions of Angular 1.x only?
A plunker to reproduce would be most helpful to debug this!
I think it might be that Angular.js 1.x changed the format of the $http response data that it saves to the cache. Ugh, angular-cache would have to change its behavior...
How to do you propose measuring how much is in localStorage?
I'll just come out and say it: There is no way to measure how much data is already stored in localStorage. localStorage could have already have been filled up by...
@dmcass Awesome thoughts, thanks!
Handling the quota exceeded error by attempting to remove the least recently used item (if any), then retrying (once) seems like it shouldn't be much work. But, what if removing...
# Recommended solution Make liberal use of the [capacity](https://github.com/jmdobry/angular-cache#capacity) option or provide a custom `storageImpl` in your cache config: With [lz-string](https://github.com/pieroxy/lz-string) compression: ``` js storageImpl: { getItem: function (key) {...