Closed simpixelated closed 9 years ago
Looking at the source for CacheFactory, it looks like the options it respects are storeOnResolve
and storeOnReject
. Was there ever a version that took all of the config options?
Sorry, the readme is incorrect. You can't set maxAge for an individual item
Edit: The readme doesn't say that you can set maxAge via put
. The only options for put
that the readme mentions are storeOnReject
and storeOnResolve
.
Thanks for the quick response! Is this something that's fairly easy to add? Like if the code is just made aware of all options can they work on a per item basis? Or would that require significant refactoring? I'm assuming the latter since you don't support it currently.
It would take some work yes, and greatly increase the complexity of the code.
Alright, then I'll use separate caches to handle that. Thanks!
First of all, great work on this module @jmdobry! However I'm running into a possible bug: I'm not able to set maxAge, or any other options via the Cache#put method, as described in the readme and #157.
This correctly inserts the item into the cache, but when I log
cache.info(0).maxAge
it's still set to the default. Here's a plunker showing the problem: (open the console to see that it logs the default maxAge) http://embed.plnkr.co/6kxQKh2VRVH9KgZcAQbe/The plunker is with angular-cache 4.3.2 and Angular 1.4.3. I'm also able to reproduce it with Angular 1.3.13.