I think a common use case for Orbit will be using the memory source in conjunction with the rest source. A rest source, for newcomers to Orbit, is typically an API that returns data.
The behavior is as follows:
Requests are always made against the memory source
The memory source defers to the rest source when a value is not found
Values returned by the rest source are cached in the memory source
Subsequent requests for the same resource will use the cached value
This example should also explore cache invalidation. Two common invalidation strategies I've seen are:
automatic invalidation based on time (resources are re-requested after, say, 5 minutes have passed)
order invalidation at the time of the request. In pseudocode: store.find('author', null, {cache: false});
I think a common use case for Orbit will be using the memory source in conjunction with the rest source. A rest source, for newcomers to Orbit, is typically an API that returns data.
The behavior is as follows:
This example should also explore cache invalidation. Two common invalidation strategies I've seen are:
store.find('author', null, {cache: false});