Class: RedisSessionStore
Defined in: service-core/src/http/session/RedisSessionStore.ts:13
Redis-backed session store for multi-instance/production deployments, where an in-process
MemorySessionStore would not be shared across horizontally-scaled instances.
Implements
Constructors
Constructor
new RedisSessionStore(
client):RedisSessionStore
Defined in: service-core/src/http/session/RedisSessionStore.ts:16
Parameters
client
Redis
Returns
RedisSessionStore
Methods
destroy()
destroy(
sessionId):Promise<void>
Defined in: service-core/src/http/session/RedisSessionStore.ts:34
Removes the session data for the given session ID, if any.
Parameters
sessionId
string
Returns
Promise<void>
Implementation of
load()
load(
sessionId):Promise<Record<string,any> |undefined>
Defined in: service-core/src/http/session/RedisSessionStore.ts:20
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>
Implementation of
save()
save(
sessionId,data,ttlSeconds):Promise<void>
Defined in: service-core/src/http/session/RedisSessionStore.ts:30
Persists the given session data, resetting its expiration to ttlSeconds from now.
Parameters
sessionId
string
data
Record<string, any>
ttlSeconds
number
Returns
Promise<void>