Map-backed ISessionStore.
MemorySessionStore(deps: MemorySessionStoreDeps)
Parameters
deps: MemorySessionStoreDeps
Injected clock and timer functions
readonly
size: number
How many entries are currently held, expired ones included.
close(): Promise<void>
Releases resources held by the store (timers, connections).
Optional: called from the plugin's onClose. A store holding nothing
omits it.
destroy(id: string): Promise<boolean>
Removes a stored session.
isHealthy(): Promise<boolean>
Reports the store's reachability, for the plugin's health indicator.
Optional: a store with no meaningful liveness check omits it, and the indicator then reports only that a store is configured.
read(id: string): Promise<SessionData | null>
Reads a stored session payload.
sweep(): void
Drops every expired entry. Exposed so the sweep is directly testable.
write(id: string,data: SessionData,ttlMs: number): Promise<void>
Writes a session payload, replacing any existing one.