redis-session-store 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/redis-session-store.rb +6 -1
  3. metadata +2 -2
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rubygems/specification'
4
4
 
5
5
  spec = Gem::Specification.new do |s|
6
6
  s.name = 'redis-session-store'
7
- s.version = '0.1.4'
7
+ s.version = '0.1.5'
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.has_rdoc = true
10
10
  s.extra_rdoc_files = ["LICENSE"]
@@ -53,7 +53,12 @@ class RedisSessionStore < ActionController::Session::AbstractStore
53
53
  def set_session(env, sid, session_data)
54
54
  options = env['rack.session.options']
55
55
  expiry = options[:expire_after] || nil
56
- @pool.set(prefixed(sid), Marshal.dump(session_data), expiry)
56
+
57
+ @pool.pipelined do |redis|
58
+ redis.set(prefixed(sid), Marshal.dump(session_data))
59
+ redis.expire(prefixed(sid), expiry) if expiry
60
+ end
61
+
57
62
  return true
58
63
  rescue Errno::ECONNREFUSED
59
64
  return false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-session-store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Meyer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-03-27 00:00:00 +01:00
12
+ date: 2010-04-08 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency