RedisSessionStore Class
Session storage backed by Redis
Constructor
RedisSessionStore
()
Item Index
Properties
- SESSION_KEY_PREFIX static
Methods
clear
-
sessionId -
cb
Deletes a session if it exists.
Parameters:
-
sessionIdString -
cbFunctionCallback of form cb(err, [int SESSIONS_CLEARED])
get
-
sessionId -
cb
Responsable for retrieving the session for persistent storage.
Parameters:
-
sessionIdStringThe identifier of the session to retrieve.
-
cbFunctionCallback of form cb(err, [Object])
getSessionKey
-
sessionId
Constructs a session cache key provided a session id.
Parameters:
-
sessionIdString
Returns:
[RedisSessionStore.SESSION_KEY_PREFIX][sessionId]
set
-
session -
cb
Responsable for persisting the session object between user requests
Parameters:
-
sessionObjectThe session object to store. The session object must contain the following in addition to other data:
{ uid: [primitive] } -
cbFunctionCallback of form cb(err, 'OK')
shutdown
-
cb
Responsable for shutting down the session store and any resources used for reaping expired sessions.
Parameters:
-
cbFunction
start
-
cb
Repsonsible for ensuring that the mechanism that expires sessions becomes active.
Parameters:
-
cbFunction
Properties
SESSION_KEY_PREFIX
String
static
The prefix to prepend to the session ID in order to construct a cache key
