Class | Rack::Session::Pool |
In: |
lib/rack/session/pool.rb
|
Parent: | Object |
Rack::Session::Pool provides simple cookie based session management. Session data is stored in a hash held by @pool. The corresponding session key sent to the client. The pool is unmonitored and unregulated, which means that over prolonged use the session pool will be very large.
Example:
use Rack::Session::Pool, :key => 'rack.session', :domain => 'foo.com', :path => '/', :expire_after => 2592000 All parameters are optional.
key | [R] | |
pool | [R] |
# File lib/rack/session/pool.rb, line 23 23: def initialize(app, options={}) 24: @app = app 25: @key = options[:key] || "rack.session" 26: @default_options = {:domain => nil, 27: :path => "/", 28: :expire_after => nil}.merge(options) 29: @pool = Hash.new 30: @default_context = context app, &nil 31: end