class HTTPSession::Storage::Memory(T)
- HTTPSession::Storage::Memory(T)
- HTTPSession::Storage(T)
- Reference
- Object
Defined in:
storage/memory.crInstance Method Summary
-
#delete(session_id : String) : Nil
Deletes the storage value for session_id.
-
#delete_expired(min : Time) : Nil
Deletes all expired storage values, i.e.
-
#fetch(session_id : String) : Entry(T) | Nil
Fetches an entry indicated by session_id.
-
#new_session_id : String
Generates a new unused session_id.
-
#put(session_id : String, entry : Entry(T)) : Nil
Sets the entry for session_id.
Instance methods inherited from class HTTPSession::Storage(T)
[](session_id : String) : T | Nil
[],
[]=(session_id : String, session : T) : Nil
[]=,
delete_expired(min : Time) : Nil
delete_expired,
fetch(session_id : String) : Entry(T) | Nil
fetch,
gc_interval : Time::Span
gc_interval,
gc_interval=(gc_interval : Time::Span)
gc_interval=,
max_age : Time::Span
max_age,
max_age=(max_age : Time::Span)
max_age=,
put(session_id : String, entry : Entry(T)) : Nil
put,
run_gc_loop
run_gc_loop
Instance methods inherited from module HTTPSession::StorageInterface(T)
[](session_id : String) : T | Nil
[],
[]=(session_id : String, session : T) : Nil
[]=,
delete(session_id : String) : Nil
delete,
has?(session_id : String) : Bool
has?,
new_session_id : String
new_session_id
Instance Method Detail
def delete(session_id : String) : Nil
#
Description copied from module HTTPSession::StorageInterface(T)
Deletes the storage value for session_id.
def delete_expired(min : Time) : Nil
#
Description copied from class HTTPSession::Storage(T)
Deletes all expired storage values, i.e. which have not been touched since time.
Description copied from class HTTPSession::Storage(T)
Fetches an entry indicated by session_id.
Returns nil
if no entry exists.
Description copied from class HTTPSession::Storage(T)
Sets the entry for session_id.