Since a few months we consider the use of Ember Data in one of our Ember projects. Each time we start looking at it or create a spike, we are faced with the problem of data caching in the store (load once and never load again; unless you invalidate the cache).
Data caching might be good for data that never (or almost never) changes or for cases whereby a user always works on his “own” set of data. In multi-user, enterprise applications this is barely the case. Users are looking at views in which data records are constantly added, removed, modified, etc. What is a recommended practice to handle such cases ? Always invalidate the cache so that everything is always reloaded ? Or subscribe to update/add/remove events via websockets or long pulling process ? Or a combination of the 2 ? Or always reload everything ?
An application like Discourse is never caching; it reloads for each route/view tons of data. Similar approach to other live Ember apps …
A simple example: we have a scheduling application. Two users are looking at the same schedule. User 1 adds an appointment. This appointment will never show up in the view of user 2 … In the view of user 2, it is not simply adding this appointment via socket.io or similar; we also need to remove the free time slots, increase an appointment counter, remove the same patient from the waiting list on which he was, etc.
Looking forward to your feedback !