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_ |
|
| session_ |
|
| 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_ |
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_ |
|
<code/>and<pre/>for code samples.