Redis-backed cache service plugin for Koishi bot framework v4.15+. Provides database-agnostic caching with TTL support, LRU eviction, and Redis Sentinel/Cluster compatibility. Current version 2.1.3 supports Koishi 4.15+. Key differentiators: fully typed (TypeScript), zero-dependency beyond Koishi+Redis, dual ESM/CJS exports, and integration with Koishi's schema-driven config. Releases follow Koishi plugin conventions.
npm install koishi-plugin-cache-redisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize Koishi app with Redis cache plugin, connecting to Redis with configurable host, port, and password.
Update koishi to ^4.15.0 or use koishi-plugin-cache-redis@1.x.
Set a unique $key in plugin config, e.g., $key: 'mybot'.
Configure TLS via redis.tls or use a Redis proxy.
Wrap ioredis cluster client and pass via redis option.
Ensure cache plugin is loaded before any plugin that uses ctx.cache.
Start Redis server or check REDIS_HOST/REDIS_PORT environment variables.
Set correct REDIS_PASSWORD environment variable or remove if no password.