glimr_redis/redis

Redis Adapter

A clean public entry point that hides config parsing, pool construction, cache operations, and session storage behind simple start calls. The app’s main module reads as a simple sequence of start calls rather than manual config loading and plumbing.

Types

Pool is opaque because a Pool that wasn’t started through start_pool would have no supervisor behind it — cache operations would silently fail or crash with confusing Valkyrie errors instead of a clear startup failure.

pub opaque type Pool

Values

pub fn session_store(name: String) -> session.SessionStore

Sessions need a backing store, and Redis is the go-to for multi-server deployments where in-memory stores won’t work. This starts a Redis pool and returns a SessionStore you can pass straight to session.setup() in your bootstrap — same one-liner pattern as starting a cache.

pub fn start(name: String) -> cache.CachePool

Without this, every app’s main module would need to import the config loader, the driver module, and the pool module just to get a cache going — three imports and four lines of boilerplate repeated in every project. This collapses all of that into a single call with just a name.

Search Document