Class

MemorySession

Extends:

Sessions stored in memory.

And a setting in +merb.yml+:

:session_store: mem_cache
:memory_session_ttl: 3600 (in seconds, one hour)

Sessions will remain in memory until the server is stopped or the time as set in :memory_session_ttl expires.

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
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.