egg-session-memcached
Session extension for store the session data in memcached.
Install
$ npm i egg-session-memcached --save
Usage
// {app_root}/app.js// If you want to use session in your middleware. You need to add it after session middleware.const index = appconfigcoreMiddleware;if index >= 0 appconfigcoreMiddleware;
// {app_root}/config/plugin.jsexports'session-memcached' = enable: true package: 'egg-session-memcached';
Configuration
// {app_root}/config/config.default.js exports'session-memcached' = client: host: `` port: `` failOverServers: // Your memcached fail over servers. Including the port and host. ;