Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 1.06 KB

File metadata and controls

32 lines (19 loc) · 1.06 KB

redis-keyspace

Similar in use to Ruby’s redis-namespace for node.

Install

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

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 ))

Initialization

With options:

client = redis_keyspace.createClient(6380, '192.168.168.100', {'prefix': 'your_keyspace'})

Incompatible Commands

Thanks

This is a CoffeeScript spinoff of node-redis-namespace from Aaron Schlesinger.