Similar in use to Ruby’s redis-namespace for node.
npm install redis redis-keyspace # will also install the redis adapter
or
npm install hiredis redis redis-keyspace # will also install the high performance redis C adapter
Use this library just as you would node_redis
redis_keyspace = require('redis-keyspace')
client = redis_keyspace.createClient()
client.set('KOO', 'DOO', (err, reply) -> console.log( 'set reply: ' + reply + " err: " + err ))
client.get('KOO', (err, reply) -> console.log( 'get reply: ' + reply + " err: " + err ))
With options:
client = redis_keyspace.createClient(6380, '192.168.168.100', {'prefix': 'your_keyspace'})
This is a CoffeeScript spinoff of node-redis-namespace from Aaron Schlesinger.