This module exposes a component for storing and retrieving data from a
This parameter holds a reference to the current session manager.
Functions session-ref, session-set!,
session-update! and session-remove! use this
parameter under the hood to locate the manager.
The parameter is installed by wrap-session.
This parameter holds the session id for the current request. If the
current request handler is wrapped with wrap-session
this is guaranteed not to be #f
Returns #t when v is a session manager.
Returns a function that will create a session manager in accordance
with the given options.
Looks up k in the current session, returning d if
the key is not found. If d is not provided, then a user
error is raised.
Stores v under the k key in the current session.
Updates k in the current session by applying p to
it. If k is not set then d is used as the default
value. If d is not provided, then a user error is raised.
Removes k from the current session. Does nothing if
k is not set in the current session.
Wraps a handler such that the appropriate session information for
the current visitor is loaded and, eventually, stored.
If the current visitor doesn’t have a session cookie then a new one
is generated and added to the response.
Each session’s lifetime is extended with every page load.
22.1 Session Stores
Returns #t when v is a session store.
A session store that keeps all session data in memory, persisting
and loading it to/from disk on shutdown and startup.
ttl controls how many seconds to wait before removing stale