Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Redis session store for Connect

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 History.md
Octocat-spinner-32 Makefile
Octocat-spinner-32 Readme.md
Octocat-spinner-32 bm.js
Octocat-spinner-32 example.js
Octocat-spinner-32 index.html
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
Octocat-spinner-32 test.js
Readme.md

Connect Redis

connect-redis is a Redis session store backed by node_redis, and is insanely fast :).

Installation

Via git:

$ git clone git://github.com/visionmedia/connect-redis.git ~/.node_libraries/connect-redis

via npm:

$ npm install connect-redis

Options

  • maxAge Sets key via the EXPIRE command (also the session's cookie)
  • host Redis server hostname
  • port Redis server portno
  • ... Remaining options passed to the redis createClient() method.

Example

var connect = require('connect')
      , RedisStore = require('connect-redis');

connect.createServer(
  connect.cookieDecoder(),
  // 5 minutes
  connect.session({ store: new RedisStore({ maxAge: 300000 }) })
);
Something went wrong with that request. Please try again.