Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Client-side persistence layer for backbone?

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?

like image 797
Leopd Avatar asked Sep 09 '26 15:09

Leopd


1 Answers

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

like image 154
Derick Bailey Avatar answered Sep 12 '26 05:09

Derick Bailey