Redis-based session store plugin for the Egg.js framework (v2.1.0, stable). Designed to persist session data in Redis, leveraging the egg-redis plugin. Requires both egg-redis and egg-session-redis to be enabled. Supports single and multiple Redis instances with configurable instance selection. Minimal configuration; works out-of-the-box with a single Redis client. Active maintenance, used in production by many Egg.js projects. Key differentiator: seamless integration with Egg.js lifecycle, no boilerplate.
npm install egg-session-redisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to enable and configure egg-session-redis with a single Redis client, then use session in a route.
Add exports.sessionRedis = { name: 'yourSessionClientName' } in config.Set agent: true in redis client config.
Monitor Redis memory usage and configure session TTL via Egg.js session config if needed.
Ensure both plugins are enabled in config/plugin.js and provide redis config in config.default.js.
Run: npm install egg-redis
Check your redis config in config.default.js: ensure host, port, password, db are correct.