Class Rack::Session::Pool
In: lib/rack/session/pool.rb
Parent: Abstract::ID

Rack::Session::Pool provides simple cookie based session management. Session data is stored in a hash held by @pool. In the context of a multithreaded environment, sessions being committed to the pool is done in a merging manner.

Example:

  myapp = MyRackApp.new
  sessioned = Rack::Session::Pool.new(myapp,
    :key => 'rack.session',
    :domain => 'foo.com',
    :path => '/',
    :expire_after => 2592000
  )
  Rack::Handler::WEBrick.run sessioned

Methods

new  

Constants

DEFAULT_OPTIONS = Abstract::ID::DEFAULT_OPTIONS.dup

Attributes

mutex  [R] 
pool  [R] 

Public Class methods

[Source]

    # File lib/rack/session/pool.rb, line 30
30:       def initialize(app, options={})
31:         super
32:         @pool = Hash.new
33:         @mutex = Mutex.new
34:       end

[Validate]