| Class | Merb::MemCacheSession |
| In: |
lib/merb-core/dispatch/session/memcached.rb
|
| Parent: | Object |
Sessions stored in memcached.
Requires setup in your +init.rb+.
require 'memcache'
CACHE = MemCache.new('127.0.0.1:11211', { :namespace => 'my_app' })
And a setting in +init.rb+:
c[:session_store] = 'memcache'
If you are using the memcached gem instead of memcache-client, you must setup like this:
require 'memcached'
CACHE = Memcached.new('127.0.0.1:11211', { :namespace => 'my_app' })
| data | [RW] | |
| needs_new_cookie | [RW] | |
| session_id | [RW] |
| session_id<String: | The ID of the session to retrieve. |
| Array: | A pair consisting of a MemCacheSession and the session‘s ID. If no sessions matched session_id, a new MemCacheSession will be generated. |
| k<~to_s>: | The key of the session parameter to retrieve. |
| String: | The value of the session parameter. |
| k<~to_s>: | The key of the session parameter to set. |
| v<~to_s>: | The value of the session parameter to set. |