Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,10 @@ Configuration
=============

See lib/redis-session-store.rb for a list of valid options.
Set them using:

ActionController::Base.session = {
:db => 2,
:expire_after => 120.minutes,
:key_prefix => "myapp:session:"
}


In your Rails app, throw in an initializer with the following contents
and the configuration above:

Rails.application.config.session_store :redis_session_store
YourApp::Application.config.session_store :redis_session_store,
:db => 0,
:expire_after => 10.minutes,
:key_prefix => "your_app:session:"
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.1
0.3.2
3 changes: 1 addition & 2 deletions lib/redis-session-store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ def get_session(env, sid)
[sid, session]
end

def set_session(env, sid, session_data)
options = env['rack.session.options']
def set_session(env, sid, session_data, options)
expiry = options[:expire_after] || nil

@redis.pipelined do
Expand Down
17 changes: 9 additions & 8 deletions rails3-redis2-session-store.gemspec
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = %q{rails3-redis2-session-store}
s.version = "0.3.1"
s.version = "0.3.2"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Mathias Meyer", "Ivan Porto Carrero"]
s.date = %q{2010-12-07}
s.date = %q{2011-03-08}
s.description = %q{A drop-in replacement for e.g. MemCacheStore to store Rails sessions (and Rails sessions only) in Redis.}
s.email = %q{ivan@flanders.co.nz}
s.extra_rdoc_files = [
"LICENSE",
"README.md"
"README.md"
]
s.files = [
"LICENSE",
"README.md",
"Rakefile",
"VERSION",
"lib/redis-session-store.rb"
"README.md",
"Rakefile",
"VERSION",
"lib/redis-session-store.rb"
]
s.homepage = %q{http://github.com/casualjim/redis-session-store}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.7}
s.summary = %q{Rails 3 Redis 2 session store}
Expand Down