Skip to content

Provides simple cookie based session management, with the session data stored in Redis

License

Notifications You must be signed in to change notification settings

wolny/rack-session-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rack::Session::Redis

Rack::Session::Redis::SessionService provides simple cookie based session management. Session data is stored in Redis and the corresponding session key is maintained in the cookie. You may treat SessionService as you would Rack::Session::Pool.

You can use all options supported by Rack::Session::Abstract::ID.

Installation

Add this line to your application's Gemfile:

gem 'rack-session-redis'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rack-session-redis

Usage

use Rack::Session::Redis::SessionService, 
    key: 'my_session_key',
    domain: 'example.com',
    path: '/',
    expire_after: 3600,
    redis_options: {host: 'redis-master.example.com', port: 6379, db: 13},
    key_prefix: 'my:session:'

About

Provides simple cookie based session management, with the session data stored in Redis

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages