tlhunter / node-grille

Google Spreadsheets CMS

Home Page:https://www.npmjs.com/package/grille

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Caching and versioning of data

tlhunter opened this issue · comments

I was going to "leave this up to the reader", but it's vital enough that it should really be in the module.

Allow the passing in of a storage class to the Registry which requires a few methods:

save(version, data, function(err} {});
getCurrentVersion(function(err, version) {});
load(version, function(err, data) {});
loadCurrentVersion(function(err, data) {});
list(function(err, versions) {});

Storage will need to track the "current version", and some sort of key/value pairing of versions to data.

Also provide a Redis based example.