Clears all sessions from storage.
Deletes a session by ID.
The session ID to delete
Exports all sessions as a formatted JSON string.
JSON string representation of all sessions
Retrieves all sessions, sorted by most recent first.
Array of all sessions (copies)
Retrieves a session by ID.
The session ID to look up
A copy of the session, or null if not found
Imports sessions from a JSON string, adding to existing sessions.
JSON string containing an array of sessions
Saves or updates a session in storage.
The session to save (uses session.id as key)
In-memory storage implementation for X-Ray sessions. Useful for demos, testing, and single-page applications.
Example