Local storage and caching utility
$ npm install hr.storage
var storage = require("hr.storage");
// Read a value from storage
storage.get("hello");
// Write a value in storage
storage.set("hello", "world");
// JSON-Serializable object can be used
storage.set("hello", { message: "World" });
var Cache = require("hr.cache").Cache;
var cache = new Cache({
namespace: "files"
});
// Set a value
cache.set("README.md", { content: "File content "}, 60*1000);