mrappleton/backbone-fetch-cache — pull request #68 by pandaiolo (2014-01-14 15:56:07+00:00)
Title: Add cache of collection models, readme update

By default, individual models and collections, are each stored independently in the cache store, even if a collection may contain items also cached as models.

I wanted to be able to reduce this redundancy (and additional network calls), by caching models contained in the collections, not as collection attributes but as actual models.

I hence modified the way the plugin stores the collections, my making it stores only models, and for collection, the models keys.

I deactivated the feature by default, to keep the plugin working as current version. It can be enabled with a global option - see readme that I changed. Not sure this is the best thing, some might be interested to have full collection caching for specific models, and model caching for others. I don't know if there are drawbacks activating this by defaults. (Maybe : collection items must be cacheable as models for this to work)

Feel free to include or not this pull request based on how you see the usage of it ! And thanks for the plugin !