Prevent unnecessary server calls


#1

Hi there, I am loading data with a DS.RESTAdapter inside a route (within its model hook). The request takes a certain time. If I re-visit the route later on, I get the already loaded data rendered instantly, but I can see that the DS.RESTAdapter fetches the data again. How do I prevent this unnecessary network call (as I already have the data)?

Regards, Martin


#2

You can tweak the cacheing behavior. http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_new-adapter-hooks-for-better-caching


#3

Thanks, varblob! This was super-helpful! Regards, Martin