A collection of utilities for node-redis.

npm install redis_util
2 downloads in the last month

Redis Utils

A collection of utilities for node-redis, such as a hashing frontend and queue interface.


To install with npm:

npm install redis_util


Insert a key/value pair into the appropriate server after hasing a key.

var key = 'test';
var redis_hash = new RedisHash([{host: ''}, {host: ''}]);
redis_hash.getServers(key)[0].set(key, 'some data for key');

Insert data into a queue and wait for a response:

var cluster = [{host: ''}, {host: ''}];
var queue = new RedisQueue('test', cluster);
queue.on('ready', function () {
    queue.sync('payload', null, function (result) {

Run a worker and return uppercase version of payload.

var worker = new RedisQueue('test', cluster); (key, data, next) { next(data.toUpperCase()); });
npm loves you