Class | Rack::Session::Memcache
In: | lib/rack/session/memcache.rb
Parent: | Abstract::ID

Rack::Session::Memcache provides simple cookie based session management. Session data is stored in memcached. The corresponding session key is maintained in the cookie. You may treat Session::Memcache as you would Session::Pool with the following caveats.

- Setting :expire_after to 0 would note to the Memcache server to hang onto the session data until it would drop it according to it‘s own specifications. However, the cookie sent to the client would expire immediately.

Note that memcache does drop data before it may be listed to expire. For a full description of behaviour, please see memcache‘s documentation.

### Methods

destroy_session generate_sid get_session new set_session with_lock

### Constants

DEFAULT_OPTIONS | = | Abstract::ID::DEFAULT_OPTIONS.merge \ :namespace => 'rack:session', :memcache_server => 'localhost:11211'

### Attributes

mutex | [R] |
pool | [R] |

### Public Class methods

new(app, options={})

### Public Instance methods

destroy_session(env, session_id, options)
generate_sid()
get_session(env, sid)
set_session(env, session_id, new_session, options)
with_lock(env) {|| ...}

[Validate]