struct PrivPage::Session(T)

Defined in:

session.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(io : IO = STDERR) #

[View source]

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.


[View source]
def get?(session_key : String | Nil) : T | Nil #

Gets a session, if present.


[View source]
def size : Int32 #

[View source]
def start_gc(interval : Time::Span, max_period : Time::Span) #

Starts the Session Garbage Collector in the background.


[View source]