You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my application I use $resource exclusively and have cache factories configured for each distinct resource. The issue I am running into is code very far removed from the resource needs to request a brand new object. I wrapped the resource in my own object and made the cache factory available. So calling something like Resource.clearCache() will remove all cache items for that resource. This works well but of course nukes the entire cache for that resource object.
I'm not entirely sure this is possible but i would like to be able to configure a cache factory to use a specific property from the returned JSON as the cache key. For example with a Mongo DB the _id is always unique and would be great if i could tell the cache factory to use this property as the key. I could then call Resource.clearCache('my_id') and this method would attempt to clear just the cache record for that key.
The text was updated successfully, but these errors were encountered:
In my application I use $resource exclusively and have cache factories configured for each distinct resource. The issue I am running into is code very far removed from the resource needs to request a brand new object. I wrapped the resource in my own object and made the cache factory available. So calling something like Resource.clearCache() will remove all cache items for that resource. This works well but of course nukes the entire cache for that resource object.
I'm not entirely sure this is possible but i would like to be able to configure a cache factory to use a specific property from the returned JSON as the cache key. For example with a Mongo DB the _id is always unique and would be great if i could tell the cache factory to use this property as the key. I could then call Resource.clearCache('my_id') and this method would attempt to clear just the cache record for that key.
The text was updated successfully, but these errors were encountered: