findAll get from cache


#1

Hi, I want to know how to use findAll function to get cached records from store, without querying to server, everytime I use findAll, Ember go to server.


#2

peekAll should do the trick

http://emberjs.com/api/data/classes/DS.Store.html#method_peekAll


#3

@jasonmit that’s right!

Additionally you can check out the adapter methods shouldReloadAll and shouldBackgroundReloadAll which make it possible to define when findAll makes a request and when it should just use the cached data in the store.