struct PrivPage::Session(T)
- PrivPage::Session(T)
- Struct
- Value
- Object
Defined in:
session.crConstructors
Instance Method Summary
-
#add(key : String, session : T, time : Time = Time.utc) : T
Store a new session.
-
#get?(session_key : String | Nil) : T | Nil
Gets a session, if present.
- #size : Int32
-
#start_gc(interval : Time::Span, max_period : Time::Span)
Starts the Session Garbage Collector in the background.
Constructor Detail
Instance Method Detail
def add(key : String, session : T, time : Time = Time.utc) : T
#
Store a new session. It is advised to have a secure random session key.
def start_gc(interval : Time::Span, max_period : Time::Span)
#
Starts the Session Garbage Collector in the background.