I’m looking for a client-side persistence layer that works with backbone.js. Something along the lines of lawnchair but that plugs in to the backbone model layer. I’ve thought about writing my own — override Backbone.sync with a caching layer which looks up things in HTML5 storage and delegates to the original Backbone.sync to talk to the server. I know this problem is really hard to do right and generally, but I can get by with fairly minimal caching logic.
I’d rather not re-invent the wheel if somebody else has already done it. Know of any solutions?
there’s an implementation of backbone.sync that uses local storage: https://github.com/jeromegn/Backbone.localStorage
this could be adapted to do local storage and then sync to the server