node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



This is a pluggable backend for Cacher (

What is it?

A small adapter that uses redis as a backend


CacherRedis takes the same parameters as node-redis.createClient (

var CacherRedis = require('cacher-redis')
var cacheBackend = new CacherRedis(host, port, opts)

Additionally, it can take an existing redis connection and resuse it:

var redisClient = require('redis').createClient()
var CacherRedis = require('cacher-redis')
var Cacher = requrie('cacher')
var cacher = new Cacher(new CacherRedis(redisClient))

Keys are also namespaced, opts.namespace defines the namespace, the deafult namespace is "cacher"