Stored mapping from a client session id to a conversation, per principal.
The mapping is a table, so it survives a restart and is shared by every node. The unique index
on (principal, session_id) decides a race between two requests (on one node or several): one
creates the mapping, the other finds it and discards the conversation it had made.
Rows idle longer than config :super_pi, gateway_session_ttl_days (default 90) are deleted,
and the table keeps at most gateway_session_limit rows (default 100_000), oldest first. A
deleted session id starts a new conversation.
Summary
Functions
Number of stored sessions.
Returns {conversation_id, new?}. create_fun makes a conversation when the session is new.
The conversation id for a session, or nil.
Deletes expired rows and rows beyond the limit. Returns the number deleted.
Functions
Number of stored sessions.
Returns {conversation_id, new?}. create_fun makes a conversation when the session is new.
The conversation id for a session, or nil.
Deletes expired rows and rows beyond the limit. Returns the number deleted.