Class

MemCacheSession

Extends:

Sessions stored in memcached.

Requires setup in your +merb_init.rb+:

require 'memcache'
CACHE = MemCache.new('127.0.0.1:11211', { :namespace => 'my_app' })

And a setting in +merb.yml+:

:session_store: mem_cache
Public Attributes
data
needs_new_cookie
session_id
Public Methods
[]
[]= assigns a key value pair
delete Lazy-delete of session data
each
generate Generates a new session ID and creates a row for the new session in the database.
loaded? Has the session been loaded yet?
new
persist Gets the existing session based on the session_id available in cookies. If none is found, generates a new session.
refresh_expiration Recreates the cookie with the default expiration time Useful during log in for pushing back the expiration date
regenerate Regenerate the Session ID
reloadable? Don’t try to reload in dev mode.
Private Methods
method_missing
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.