Closed jrencz closed 8 years ago
I tried to connect angular-cache with ocombe/angular-localForage (in general - CacheFactory and mozilla/localForage) but it turns out that async storge implementation is not supported by CacheFactory. For example index.js#L417-L420:
angular-cache
CacheFactory
$$storage().removeItem(this.$$prefix + '.data.' + key); var keysJson = $$storage().getItem(this.$$prefix + '.keys'); var keys = keysJson ? utils.fromJson(keysJson) : []; var index = keys.indexOf(key);
this clearly does not allow removeItem and getItem to return promises.
removeItem
getItem
@jmdobry are you interested in implementing async storage in CacheFactory? Do you see any obvious cons for this idea?
See https://github.com/jmdobry/angular-cache/pull/146#issuecomment-72510034 and https://github.com/jmdobry/angular-cache/issues/108#issuecomment-45746483
I recommend js-data & js-data-localforage instead.
Ok
I tried to connect
angular-cache
with ocombe/angular-localForage (in general -CacheFactory
and mozilla/localForage) but it turns out that async storge implementation is not supported byCacheFactory
. For example index.js#L417-L420:this clearly does not allow
removeItem
andgetItem
to return promises.@jmdobry are you interested in implementing async storage in
CacheFactory
? Do you see any obvious cons for this idea?