Skip to main content

Interface: SessionStore

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

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

Methods

delete()

delete(sessionId): Promise<void>

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

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:12

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:14

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

Parameters

sessionId

string

data

Record<string, any>

ttlSeconds?

number

Returns

Promise<void>