Model insists on loading every access


I have a normal donejs model that reloads the same info every time I render a component for a new situation. The data changes rarely.

I cannot figure out how to make the model only load once and then let me render it repeatedly.



If you can switch to can-connect, it solves this problem with the cache-requests behavior.

If you can’t migrate, you can create a findAll that saves the promise:

var findAllPromise;
  findAll: function(params){
      return findAllPromise
    return findAllPromise = $.get("/api/things", params);