class Kemal::Session::PostgresEngine

Defined in:

kemal-session-postgres.cr

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(db_conn : DB::Database, sessions_table : String = "kemal_sessions", cache_ttl : Time::Span = 60.seconds, propagate_strategy : Symbol = :invalidate) #

[View source]

Macro Detail

macro define_delegators(vars) #

[View source]

Instance Method Detail

def all_sessions : Array(Session) #

[View source]
def bigint(session_id : String, k : String, v : Int64) #

[View source]
def bigint(session_id : String, k : String) : Int64 #

[View source]
def bigint?(session_id : String, k : String) : Int64 | Nil #

[View source]
def bigints(session_id : String) : Hash(String, Int64) #

[View source]
def bool(session_id : String, k : String, v : Bool) #

[View source]
def bool(session_id : String, k : String) : Bool #

[View source]
def bool?(session_id : String, k : String) : Bool | Nil #

[View source]
def bools(session_id : String) : Hash(String, Bool) #

[View source]

[View source]
def cache=(cache : Hash(String, Kemal::Session::PostgresEngine::StorageInstance)) #

[View source]
def cache_times : Hash(String, Time) #

[View source]
def cache_times=(cache_times : Hash(String, Time)) #

[View source]
def cache_ttl : Time::Span #

[View source]
def cache_ttl=(cache_ttl : Time::Span) #

[View source]
def create_session(id) #

[View source]
def db_conn : DB::Database #

[View source]
def db_conn=(db_conn : DB::Database) #

[View source]
def destroy_all_sessions #

[View source]
def destroy_session(id) #

[View source]
def each_session(&) #

[View source]
def engine_id : String #

[View source]
def engine_id=(engine_id : String) #

[View source]
def float(session_id : String, k : String, v : Float64) #

[View source]
def float(session_id : String, k : String) : Float64 #

[View source]
def float?(session_id : String, k : String) : Float64 | Nil #

[View source]
def floats(session_id : String) : Hash(String, Float64) #

[View source]
def get_session(id) : Kemal::Session | Nil #

[View source]
def int(session_id : String, k : String, v : Int32) #

[View source]
def int(session_id : String, k : String) : Int32 #

[View source]
def int?(session_id : String, k : String) : Int32 | Nil #

[View source]
def ints(session_id : String) : Hash(String, Int32) #

[View source]
def is_in_cache?(id) #

[View source]
def load_into_cache(id, broadcast = true) #

[View source]
def object(session_id : String, k : String, v : Session::StorableObject::StorableObjectContainer) #

[View source]
def object(session_id : String, k : String) : Session::StorableObject::StorableObjectContainer #

[View source]
def object?(session_id : String, k : String) : Session::StorableObject::StorableObjectContainer | Nil #

[View source]
def objects(session_id : String) : Hash(String, Session::StorableObject::StorableObjectContainer) #

[View source]
def propagate_strategy : Symbol #

[View source]
def propagate_strategy=(propagate_strategy : Symbol) #

[View source]
def run_gc #

[View source]
def save_cache(id) #

[View source]
def session_exists?(id) #

[View source]
def string(session_id : String, k : String, v : String) #

[View source]
def string(session_id : String, k : String) : String #

[View source]
def string?(session_id : String, k : String) : String | Nil #

[View source]
def strings(session_id : String) : Hash(String, String) #

[View source]