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:
-
sessionId
String -
cb
FunctionCallback of form cb(err, [int SESSIONS_CLEARED])
get
-
sessionId
-
cb
Responsable for retrieving the session for persistent storage.
Parameters:
-
sessionId
StringThe identifier of the session to retrieve.
-
cb
FunctionCallback of form cb(err, [Object])
getSessionKey
-
sessionId
Constructs a session cache key provided a session id.
Parameters:
-
sessionId
String
Returns:
[RedisSessionStore.SESSION_KEY_PREFIX][sessionId]
set
-
session
-
cb
Responsable for persisting the session object between user requests
Parameters:
-
session
ObjectThe session object to store. The session object must contain the following in addition to other data:
{ uid: [primitive] }
-
cb
FunctionCallback of form cb(err, 'OK')
shutdown
-
cb
Responsable for shutting down the session store and any resources used for reaping expired sessions.
Parameters:
-
cb
Function
start
-
cb
Repsonsible for ensuring that the mechanism that expires sessions becomes active.
Parameters:
-
cb
Function
Properties
SESSION_KEY_PREFIX
String
static
The prefix to prepend to the session ID in order to construct a cache key