Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (19 sloc) 0.754 kB

Connect Redis

connect-redis is a Redis session store backed by node-redis-client.

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(),
    connect.session({ store: new RedisStore({ maxAge: 150 }) })
);
Jump to Line
Something went wrong with that request. Please try again.