Prisma Redis Caching Middleware

JSON →
library 4.8.0 ·javascript
verified May 27, 2026

prisma-redis-middleware is a Prisma middleware designed to cache the results of Prisma queries in Redis, significantly improving application performance by reducing database load. It also provides an in-memory LRU cache as a fallback mechanism. The current stable version is 4.8.0, with frequent patch and minor releases, indicating active development and responsiveness to community needs. Key features include fine-grained cache invalidation, support for custom cache keys, persistence with Redis, and the ability to define specific caching rules for individual Prisma models and methods (e.g., `findUnique`, `findMany`, `count`, `aggregate`, `groupBy`). It allows developers to include or exclude certain models or query methods from being cached, and define custom cache times per model, distinguishing it from simpler caching solutions. The middleware internally leverages `async-cache-dedupe` for efficient request deduplication. Developers must provide their own Redis client implementation, such as `ioredis`, which is a common and recommended choice for robust Redis connectivity.

total hits 28
actors 10 distinct systems
last hit 2d ago human
ByteDance
6
Amazonbot
4
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2
Humans
2

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France · 🇬🇧 United Kingdom