Shopify/batman — pull request #344 by hornairs (2012-02-28 18:37:51+00:00)
Title: View Caching

- Add `Batman.RenderCache` which is a LRU cache for Views.
- Remove root-node-less Views
- Add `Batman.DOM.Yield`, a class which manages yields.
- Add `Batman.DOM.Yield.withName`, a class function to fetch the one yield object representing the yield with that identifier
- Switches nodes which yield from a view to be stored on a `yields` object on that view
- Adds functions to tell a view to populate the yields it references with the nodes who yield themselves, and to retract those nodes out of the destinations they may be in.
- Finally, caches views after they have been rendered using the `RenderCache` during dispatch, and instead of re-rendering them, checks for them in the cache and just reinserts that View into the DOM (and reinsert's it's yielded content.)