Skip to main content

Module session_backend

Module session_backend 

Source
Expand description

SQLite-backed session persistence.

Stores sessions in a dedicated _pylon_sessions table so users don’t get logged out when the server restarts.

The schema is intentionally minimal and under-engineered: every session mutation is a single UPSERT/DELETE. Reads happen only at startup via load_all. If session-churn ever outgrows this, sharding/indexing can come later without changing the trait contract.

Structs§

PostgresSessionBackend
Postgres-backed session store. Schema mirrors the SQLite version — same column set + same indexes — so a deploy that flips DATABASE_URL from a local SQLite file to a managed PG cluster only changes WHERE the rows live, not what the rows mean.
SqliteSessionBackend
Persistent session backend backed by a SQLite connection.