How to use store.find ignoring cache?


#1

Hi guys,

I am struggle with one thing: I have a listing with a search input above. I want to keep that list always loading from the URL, without browser cache. Is that possible?

For any extra clarification, here is it:

App.IndexCrmIndexRoute = Ember.Route.extend({
	model: function(params) {
		// ... parses the params
		var data = this.store.find('account', params);
	    	return data;
	},
})

#2

I got it solved by unloading all cached objects of that type:

App.IndexCrmIndexRoute = Ember.Route.extend({ model: function(params) { // … parses the params

            // Cleans accounts from store cache
            this.store.unloadAll("account");

	var data = this.store.find('account', params);
    	return data;
},

})

Because “account” is a model cllass for search results only, that is solved with no issues :slight_smile: