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.

:api: private



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

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

#retrieve_session(session_id) ⇒ Object

Parameters

session_id<String>

ID of the session to retrieve.

Returns

ContainerSession

The session corresponding to the ID.

:api: private



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

Parameters

session_id<String>

ID of the session to set.

data<ContainerSession>

The session to set.

:api: private



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