rendrjs / rendr

Render your Backbone.js apps on the client and the server, using Node.js.
MIT License
4.09k stars 312 forks source link

allow someone to pass the *entire* fetch spec. #477

Closed saponifi3d closed 9 years ago

saponifi3d commented 9 years ago

This opens up writeToCache, readFromCache, ensureKeys, etc to a lazy loaded view on a per spec basis. this also allows someone to lazy load a chunk with multiple models / collections in parallel.

purusho commented 9 years ago

writeToCache & readFromCache should be passed as fetch options not via the fetch spec. So I am not sure if this PR do the job. I know that we have this PR that has the change to pass the fetch options when doing lazy load : https://github.com/rendrjs/rendr/pull/466/files

saponifi3d commented 9 years ago

@purusho it also opens up ensure keys, ability to fetch more than one model, etc. We also can then set each model / collection as a read from cache and such, sorry that isn't very clear in the description.

This PR basically makes it so we have the rest of the functionality for a controller.

purusho commented 9 years ago

ohh, forget about that change (from this PR https://github.com/rendrjs/rendr/pull/469) :+1: for this PR

liuhelen10 commented 9 years ago

LGTM! :cookie:

ingiulio commented 9 years ago

:+1: