class Amber::Configuration::SessionConfig

Included Modules

Defined in:

amber/configuration/session_config.cr

Constant Summary

LIST_OF_VALID_STORES = ["signed_cookie", "encrypted_cookie", "adapter", "redis"]

Constructors

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]
def self.new #

[View source]

Instance Method Detail

def adapter : String #

The session adapter store: adapter uses: memory or a registered one.


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

The session adapter store: adapter uses: memory or a registered one.


[View source]
def expires : Int32 #

[View source]
def expires=(expires : Int32) #

[View source]
def key : String #

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

[View source]
def max_memory_sessions : Int32 #

The most sessions the memory adapter keeps in one process. When it is full, the session used longest ago is dropped to make room. It is read once, when the memory adapter is first built.


[View source]
def max_memory_sessions=(max_memory_sessions : Int32) #

The most sessions the memory adapter keeps in one process. When it is full, the session used longest ago is dropped to make room. It is read once, when the memory adapter is first built.


[View source]
def store : String #

Where sessions live. signed_cookie (the default) and encrypted_cookie keep the session in the visitor's cookie, so the server holds nothing. #adapter keeps it on the server through #adapter; redis is read the same way.


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

Where sessions live. signed_cookie (the default) and encrypted_cookie keep the session in the visitor's cookie, so the server holds nothing. #adapter keeps it on the server through #adapter; redis is read the same way.


[View source]
def store_type : Symbol #

[View source]
def validate! : Nil #

[View source]