Provide an option for storing user sessions in an external location (a database, for example). This will allow the app server to become stateless and enable its use in clustered environments.
Add appropriate methods to the following modules to enable storage and retrieval:
lib/session.js
lib/hooks/session.js
app/hooks/session.js
The developer will create custom store() and retrieve() methods within app/hooks/session.js that return a session ID and session object, respectively.
Add settings to init/config.js to enable external session storage:
// defaults
sessions: {
enabled: false,
lifespan: 20,
storage: 'internal'
}
// external storage
sessions: {
enabled: true,
lifespan: 15,
storage: 'external'
}
Provide an option for storing user sessions in an external location (a database, for example). This will allow the app server to become stateless and enable its use in clustered environments.
Add appropriate methods to the following modules to enable storage and retrieval:
lib/session.jslib/hooks/session.jsapp/hooks/session.jsThe developer will create custom
store()andretrieve()methods withinapp/hooks/session.jsthat return a session ID and session object, respectively.Add settings to
init/config.jsto enable external session storage: