lucian1900/Backbone.dualStorage — pull request #23 by nilbus (2012-12-05 03:34:16+00:00)
Title: Lawnchair for multiple storage backends

Lucian,

How do you feel about Backbone.dualStorage using [Lawnchair](http://brian.io/lawnchair) instead of directly using localStorage? Lawnchair will persist using localStorage, but if other adapters are available and localStorage isn't supported by the currently executing javascript runtime, lawnchair will attempt each successive adapter until it finds one that works.

Why? It allows the caching layer to work when localStorage is not supported, and it supports indexed-db and websql, which allow storing data > 2.5MB, which localStorage does not ([in most browsers](http://dev-test.nemikor.com/web-storage/support-test)). I'm in the latter camp, where 2.5MB just isn't cutting it.

This would require me first to write a suite of unit tests to make sure there aren't regressions. Since lawnchair calls are asynchronous, it'll require some refactoring of the internals, but the external API will be able to stay the same. I'm of course willing to implement all of this, since you've retired from this project. I just wanted to make sure that this kind of change is in line with your vision for the project before I do this in a fork of Backbone.dualStorage rather than adding dual-layer support to Backbone.lawnchair. Does this sound like something you would be interested in merging in eventually?