glimr/config/session
Session Configuration
Centralizes session settings so application code doesn’t need to know about config file locations or parsing. Uses persistent_term caching for fast access across all processes.
Types
Session configuration loaded from config/session.toml. Controls the session cookie name, storage table, lifetime, and browser-close expiration behavior.
pub type SessionConfig {
SessionConfig(
table: String,
cookie: String,
lifetime: Int,
expire_on_close: Bool,
)
}
Constructors
-
SessionConfig( table: String, cookie: String, lifetime: Int, expire_on_close: Bool, )
Values
pub fn load() -> SessionConfig
Safe to call repeatedly from hot paths since results are cached after first load. Returns sensible defaults on missing/invalid config to let apps start without session configuration.