Module: Merb::MemcacheStore

Included in:
MemCache, Memcached
Defined in:
lib/merb-core/dispatch/session/memcached.rb

Instance Method Summary collapse

Instance Method Details

#delete_session(session_id) ⇒ Object

Parameters

session_id<String>

ID of the session to delete.



56
57
58
# File 'lib/merb-core/dispatch/session/memcached.rb', line 56

def delete_session(session_id)
  delete("session:#{session_id}")
end

#retrieve_session(session_id) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters

session_id<String>

ID of the session to retrieve.

Returns

ContainerSession

The session corresponding to the ID.



41
42
43
# File 'lib/merb-core/dispatch/session/memcached.rb', line 41

def retrieve_session(session_id)
  get("session:#{session_id}")
end

#store_session(session_id, data) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters

session_id<String>

ID of the session to set.

data<ContainerSession>

The session to set.



50
51
52
# File 'lib/merb-core/dispatch/session/memcached.rb', line 50

def store_session(session_id, data)
  set("session:#{session_id}", data)
end