Redis Caching & BigInt
SkillDatabases & dataExplains why plain JSON.stringify/parse breaks when caching Prisma results that contain BigInt fields, and the RedisCache class that fixes it. Use before caching any Prisma model result in Redis.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Redis Caching & BigInt skill
What this skill tells your AI
The instructions your AI receives, as published by mxz7/nypsi in .agents/skills/redis-caching/SKILL.md and read by ahel’s review.
Several Prisma models use BigInt fields (e.g. ProfileView). Plain JSON.stringify/JSON.parse throws on BigInt, which breaks naive Redis caching of these rows.
Use the custom RedisCache class from src/utils/cache.ts - it handles BigInt serialization/deserialization automatically. Don't hand-roll JSON.stringify for caching Prisma results without checking the model for BigInt fields first.
Structured Redis data
All structured values sent through Redis must use redisSerialize and redisDeserialize from src/utils/cache.ts, including pub/sub messages. Low-level Redis transport wrappers such as RedisPubSub should call the codec directly; ordinary cache consumers should use RedisCache<T>. Never use plain JSON.stringify / JSON.parse for structured Redis data.
Shared guild settings
Guild prefixes, slash-only mode, and disabled channels use RedisCache so the bot clusters and main API process share one cache. Code that updates these settings outside their setters must delete the corresponding Redis key after the database update.
Signals
- GitHub stars
- 69
- Forks
- 31
- Last commit
- Sep 2026
ahel review
S4info
community integration — published by mxz7, not redis
Automated review, not a security audit. Ruleset v1.
Advanced
- Catalog kind
- skill
- Gateway key
redis-caching- Source
- github.com/mxz7/nypsi