Skip to main content

Interface: SessionStore

Defined in: service-core/src/http/session/SessionStore.ts:9

A pluggable backing store for session data, keyed by session ID. Implementations must be safe to call from concurrent requests.

Methods

destroy()

destroy(sessionId): Promise<void>

Defined in: service-core/src/http/session/SessionStore.ts:15

Removes the session data for the given session ID, if any.

Parameters

sessionId

string

Returns

Promise<void>


load()

load(sessionId): Promise<Record<string, any> | undefined>

Defined in: service-core/src/http/session/SessionStore.ts:11

Loads the session data for the given session ID, or undefined if none exists (or has expired).

Parameters

sessionId

string

Returns

Promise<Record<string, any> | undefined>


save()

save(sessionId, data, ttlSeconds): Promise<void>

Defined in: service-core/src/http/session/SessionStore.ts:13

Persists the given session data, resetting its expiration to ttlSeconds from now.

Parameters

sessionId

string

data

Record<string, any>

ttlSeconds

number

Returns

Promise<void>