object-store

In Memory Object Store which supports redis, memcached, and lru-cache

object-store

In Memory Object Store which supports redis, memcached, and lru-cache

npm install object-store

===================

var ObjectStore = require('object-store')
var store = ObjectStore.create('redis'); // redis
var store = ObjectStore.create('memcached'); // memcached
var store = ObjectStore.create('memory'); // memory
var DeferredStore = require('object-store').DeferredStore;
var store = new DeferredStore('redis');
var store = new DeferredStore('memcached');
var store = new DeferredStore('memory');

===================

store.get("hello", function(err, resp) { ... })
store.set("hello", {hello: 'world'}, function(err, resp) { ... });
store.keys("*", function(err, resp) { ... });
store.del("hello", function(err, resp) { ... });
store.has("hello", function(err, resp) { ... });
store.flush(function(err, resp) { ... });
node demo/memcached_async.js
node demo/memcached_q.js
node demo/redis_async.js
node demo/redis_q.js
node demo/memory_async.js
node demo/memory_q.js
MIT