class Kemal::Session::FileEngine

Defined in:

kemal-session/engines/file.cr

Constructors

Instance Method Summary

Macro Summary

Instance methods inherited from class Kemal::Session::Engine

all_sessions : Array(Session) all_sessions, bigint(session_id : String, k : String, v : Int64)
bigint(session_id : String, k : String) : Int64
bigint
, bigint?(session_id : String, k : String) : Int64 | Nil bigint?, bigints(session_id : String) : Hash(String, Int64) bigints, bool(session_id : String, k : String, v : Bool)
bool(session_id : String, k : String) : Bool
bool
, bool?(session_id : String, k : String) : Bool | Nil bool?, bools(session_id : String) : Hash(String, Bool) bools, create_session(session_id : String) create_session, destroy_all_sessions destroy_all_sessions, destroy_session(session_id : String) destroy_session, each_session(&block : Session -> _) each_session, float(session_id : String, k : String, v : Float64)
float(session_id : String, k : String) : Float64
float
, float?(session_id : String, k : String) : Float64 | Nil float?, floats(session_id : String) : Hash(String, Float64) floats, get_session(session_id : String) : Session | Nil get_session, int(session_id : String, k : String, v : Int32)
int(session_id : String, k : String) : Int32
int
, int?(session_id : String, k : String) : Int32 | Nil int?, ints(session_id : String) : Hash(String, Int32) ints, object(session_id : String, k : String, v : Kemal::Session::StorableObject::StorableObjectContainer)
object(session_id : String, k : String) : Kemal::Session::StorableObject::StorableObjectContainer
object
, object?(session_id : String, k : String) : Kemal::Session::StorableObject::StorableObjectContainer | Nil object?, objects(session_id : String) : Hash(String, Kemal::Session::StorableObject::StorableObjectContainer) objects, run_gc run_gc, string(session_id : String, k : String, v : String)
string(session_id : String, k : String) : String
string
, string?(session_id : String, k : String) : String | Nil string?, strings(session_id : String) : Hash(String, String) strings

Constructor Detail

def self.new(options : Hash(Symbol, String)) #

[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]
def clear_cache #

[View source]
def create_session(session_id : String) #

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

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

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

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

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

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

[View source]
def destroy_all_sessions #

[View source]
def destroy_session(session_id : String) #

[View source]
def each_session(&) #

[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(session_id : String) : 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?(session_id : String) : Bool #

[View source]
def load_into_cache(session_id : String) : StorageInstance #

[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 read_or_create_storage_instance(session_id : String) : StorageInstance #

[View source]
def run_gc #

[View source]
def save_cache #

[View source]
def session_exists?(session_id : String) : Bool #

[View source]
def session_file?(f : String) #

Note, this is only checking if it's probably a session file. tldr, don't store json in the session folder or it'll get removed eventually


[View source]
def session_filename(session_id : String) #

[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]

Macro Detail

macro define_delegators(vars) #

Delegating int(k,v), int?(k) etc. from Engine to StorageInstance


[View source]