Re:Angular-data: data store and caching for Angular.js
by tsm26 on Wednesday September 10, 2014 @03:51PM
(#8298679)
you can eject an item or collections of items from the data store with DS.eject and DS.ejectAll. Or you could load angular-cache with angular-data to activate automatic expiry of items (after a timeout or on some interval).
Re:Angular-data: data store and caching for Angular.js
by Doublon on Wednesday September 10, 2014 @04:34PM
(#8298956)
I would probably make an HTTP interceptor to remove the elements from the cache on non-GET methods. The same could probably be done on socket events if you sync your clients with socket.io or something alike.
e.g.: PUT /users/123 => delete from cache the user "123"
I couldn't find anything in the docs about invalidation. Is anybody aware of how to force invalidation of an object/collection?