we need to cover some corner cases in model.js
and add some caching so that it's easier to do good MVC design.
@ralphsmith80 and i went over some ideas, and came up with some notes:
-
Collection.prototype.load
is cached by default, you can explicitly re-send the request with the{reload: true}
parameter -
Model.prototype.refresh
on the other hand re-sends the request by default, and you can get a cached result by explicitly settingconditional: true
- TODO: add
Model.prototype.load
that behaves like the collection method, essentially just calling refresh w/ the conditional flag set to true - TODO: when refresh is called and there is an in-flight request, just return the promise of the in-flight request
- TODO: add
-
TODO: handle out-of-order responses