struct

PrivPage::Session(T)

Inherits Struct / Value / Object

Constructors

new(io : IO = STDERR)
Source

Instance methods

add(key : String, session : T, time : Time = Time.utc) : T

Store a new session. It is advised to have a secure random session key.

Source
get?(session_key : String | Nil) : T | Nil

Gets a session, if present.

Source
size
Source
start_gc(interval : Time::Span, max_period : Time::Span)

Starts the Session Garbage Collector in the background.

Source