Skip to content
This module enables you to create Redis namespaces.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

NPM version


This module enables you to create Redis namespaces.

Example usage:

var redis = require('redis');
var RedisNS = require('redis-ns');

var redisClient = redis.createClient();

var client = new RedisNS('MyNameSpace', redisClient);
var client2 = new RedisNS('MyNameSpace2', redisClient);

client.set('bla', 'yadda1');
client.set('bla1', 'yadda1');

client2.set('bla', 'yadda2');
client2.set('bla2', 'yadda2');

The above will give you the following keys in Redis:


You can leave out the connection paramater, to create a new connection:

var client = new RedisNS('MyNameSpace');

This is an early BETA version

As soon as the module has shown it's worth and stability on a live system, it will be marked as version >= 1.0.0.

Until then: Feel free to play around with it, learn from it.

To install

npm install redis-ns
Something went wrong with that request. Please try again.