Exposes a ready-to-use Redis client for Payload CMS v3 and Next.js App Router projects. You import it in API routes, hooks, server components or server actions to cache query results and delete keys from Payload afterChange and afterDelete hooks. It reads connection settings from environment variables and requires a Redis server, Node.js 18+ and Next.js 14+.
Payload CMS Redis Cache Plugin
Installation
npm i payloadcms-redis-cache2
Stars
0
Forks
0
Open Issues
6 months ago
Last Updated
16
Weekly Downloads
v1.0.3
npm Version
205.1 KB
Unpacked Size
2
Dependencies
20 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 2 |
| Dec 4, 2026 | 2 |
| Dec 3, 2026 | 2 |
| Dec 2, 2026 | 2 |
| Dec 1, 2026 | 2 |
| Nov 30, 2026 | 2 |
| Nov 29, 2026 | 2 |
| Nov 28, 2026 | 2 |
| Nov 27, 2026 | 2 |
| Nov 26, 2026 | 2 |
| Nov 25, 2026 | 2 |
| Nov 24, 2026 | 2 |
| Nov 23, 2026 | 2 |
| Nov 22, 2026 | 2 |
| Nov 21, 2026 | 2 |
| Nov 20, 2026 | 2 |
| Nov 19, 2026 | 2 |
| Nov 18, 2026 | 2 |
| Nov 17, 2026 | 2 |
| Nov 16, 2026 | 2 |
| Nov 15, 2026 | 2 |
| Nov 14, 2026 | 2 |
| Nov 13, 2026 | 2 |
| Nov 12, 2026 | 2 |
| Nov 11, 2026 | 2 |
| Nov 10, 2026 | 2 |
| Nov 9, 2026 | 2 |
| Nov 8, 2026 | 2 |
| Nov 7, 2026 | 2 |
| Nov 6, 2026 | 2 |
| Nov 5, 2026 | 2 |
| Nov 4, 2026 | 2 |
| Nov 3, 2026 | 2 |
| Nov 2, 2026 | 2 |
| Nov 1, 2026 | 2 |
| Oct 31, 2026 | 2 |
| Oct 30, 2026 | 2 |
| Oct 29, 2026 | 2 |
| Oct 28, 2026 | 2 |
| Oct 27, 2026 | 2 |
| Oct 26, 2026 | 2 |
| Oct 25, 2026 | 2 |
| Oct 24, 2026 | 2 |
| Oct 23, 2026 | 2 |
| Oct 22, 2026 | 2 |
| Oct 21, 2026 | 2 |
| Oct 20, 2026 | 2 |
| Oct 19, 2026 | 2 |
| Oct 18, 2026 | 2 |
| Oct 17, 2026 | 2 |
| Oct 16, 2026 | 2 |
| Oct 15, 2026 | 2 |
| Oct 14, 2026 | 2 |
| Oct 13, 2026 | 2 |
| Oct 12, 2026 | 2 |
| Oct 11, 2026 | 2 |
| Oct 10, 2026 | 2 |
| Oct 9, 2026 | 2 |
| Oct 8, 2026 | 2 |
| Oct 7, 2026 | 2 |
| Oct 6, 2026 | 2 |
| Oct 5, 2026 | 2 |
| Oct 4, 2026 | 2 |
| Oct 3, 2026 | 2 |
| Oct 2, 2026 | 2 |
| Oct 1, 2026 | 2 |
| Sep 30, 2026 | 2 |
| Sep 29, 2026 | 2 |
| Sep 28, 2026 | 2 |
| Sep 27, 2026 | 2 |
| Sep 26, 2026 | 2 |
| Sep 25, 2026 | 2 |
| Sep 24, 2026 | 2 |
| Sep 23, 2026 | 2 |
| Sep 22, 2026 | 2 |
| Sep 21, 2026 | 2 |
| Sep 20, 2026 | 2 |
| Sep 19, 2026 | 2 |
| Sep 18, 2026 | 2 |
| Sep 17, 2026 | 2 |
| Sep 16, 2026 | 2 |
| Sep 15, 2026 | 2 |
| Sep 14, 2026 | 2 |
| Sep 13, 2026 | 2 |
| Sep 12, 2026 | 2 |
| Sep 11, 2026 | 2 |
| Sep 10, 2026 | 2 |
| Sep 9, 2026 | 2 |
| Sep 8, 2026 | 2 |
| Sep 7, 2026 | 2 |
| Sep 6, 2026 | 2 |
5−9 since Sep 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 5 |
| Dec 4, 2026 | 5 |
| Dec 3, 2026 | 6 |
| Dec 2, 2026 | 5 |
| Dec 1, 2026 | 11 |
| Nov 30, 2026 | 12 |
| Nov 29, 2026 | 9 |
| Nov 28, 2026 | 9 |
| Nov 27, 2026 | 9 |
| Nov 26, 2026 | 8 |
| Nov 25, 2026 | 8 |
| Nov 24, 2026 | 2 |
| Nov 23, 2026 | 1 |
| Nov 22, 2026 | 3 |
| Nov 21, 2026 | 3 |
| Nov 20, 2026 | 6 |
| Nov 19, 2026 | 7 |
| Nov 18, 2026 | 8 |
| Nov 17, 2026 | 8 |
| Nov 16, 2026 | 9 |
| Nov 15, 2026 | 10 |
| Nov 14, 2026 | 10 |
| Nov 13, 2026 | 8 |
| Nov 12, 2026 | 12 |
| Nov 11, 2026 | 12 |
| Nov 10, 2026 | 13 |
| Nov 9, 2026 | 12 |
| Nov 8, 2026 | 10 |
| Nov 7, 2026 | 15 |
| Nov 6, 2026 | 13 |
| Nov 5, 2026 | 8 |
| Nov 4, 2026 | 7 |
| Nov 3, 2026 | 6 |
| Nov 2, 2026 | 8 |
| Nov 1, 2026 | 8 |
| Oct 31, 2026 | 3 |
| Oct 30, 2026 | 3 |
| Oct 29, 2026 | 3 |
| Oct 28, 2026 | 3 |
| Oct 27, 2026 | 4 |
| Oct 26, 2026 | 3 |
| Oct 25, 2026 | 2 |
| Oct 24, 2026 | 3 |
| Oct 23, 2026 | 3 |
| Oct 22, 2026 | 5 |
| Oct 21, 2026 | 5 |
| Oct 20, 2026 | 4 |
| Oct 19, 2026 | 3 |
| Oct 18, 2026 | 3 |
| Oct 17, 2026 | 3 |
| Oct 16, 2026 | 3 |
| Oct 15, 2026 | 2 |
| Oct 14, 2026 | 2 |
| Oct 13, 2026 | 2 |
| Oct 12, 2026 | 2 |
| Oct 11, 2026 | 3 |
| Oct 10, 2026 | 2 |
| Oct 9, 2026 | 2 |
| Oct 8, 2026 | 1 |
| Oct 7, 2026 | 1 |
| Oct 6, 2026 | 1 |
| Oct 5, 2026 | 1 |
| Oct 4, 2026 | 3 |
| Oct 3, 2026 | 3 |
| Oct 2, 2026 | 5 |
| Oct 1, 2026 | 5 |
| Sep 30, 2026 | 5 |
| Sep 29, 2026 | 5 |
| Sep 28, 2026 | 5 |
| Sep 27, 2026 | 2 |
| Sep 26, 2026 | 5 |
| Sep 25, 2026 | 3 |
| Sep 24, 2026 | 3 |
| Sep 23, 2026 | 3 |
| Sep 22, 2026 | 7 |
| Sep 21, 2026 | 22 |
| Sep 20, 2026 | 23 |
| Sep 19, 2026 | 24 |
| Sep 18, 2026 | 24 |
| Sep 17, 2026 | 25 |
| Sep 16, 2026 | 27 |
| Sep 15, 2026 | 23 |
| Sep 14, 2026 | 10 |
| Sep 13, 2026 | 9 |
| Sep 12, 2026 | 8 |
| Sep 11, 2026 | 12 |
| Sep 10, 2026 | 11 |
| Sep 9, 2026 | 14 |
| Sep 8, 2026 | 14 |
| Sep 7, 2026 | 14 |
| Sep 6, 2026 | 14 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1252295341-root)<a href="https://payloaddirectory.dev/plugins/1252295341-root"><img src="https://payloaddirectory.dev/badge/1252295341-root.svg" alt="Payload Directory"></a>README
Redis cache utilities for Payload CMS and Next.js applications.
A lightweight Redis helper package built for modern Payload CMS v3 + Next.js App Router projects.
npm install payloadcms-redis-cache
Create a .env file:
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=
Production Example:
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=yourpassword
import { redis } from 'payloadcms-redis-cache'
await redis.set('hello', 'world')
const value = await redis.get('hello')
console.log(value)
import { getPayload } from 'payload'
import payloadConfig from '@/payload.config'
import { redis } from 'payloadcms-redis-cache'
export async function GET() {
const cached = await redis.get('hero-slider')
if (cached) {
return Response.json({
docs: JSON.parse(cached),
})
}
const payload = await getPayload({
config: payloadConfig,
})
const data = await payload.find({
collection: 'heroslider',
})
await redis.set(
'hero-slider',
JSON.stringify(data.docs),
{
EX: 3600,
}
)
return Response.json(data)
}
hooks: {
afterChange: [
async () => {
await redis.del('hero-slider')
},
],
afterDelete: [
async () => {
await redis.del('hero-slider')
},
],
}
'use client'
import { useEffect, useState } from 'react'
export default function HeroSlider() {
const [slides, setSlides] = useState([])
useEffect(() => {
const fetchSlides = async () => {
const res = await fetch('/api/heroslider-api')
const data = await res.json()
setSlides(data.docs || [])
}
fetchSlides()
}, [])
return <div>{slides.length}</div>
}
Redis should only be used on the server.
Do NOT import Redis inside:
Correct usage locations:
Install Redis:
brew install redis
Start Redis:
brew services start redis
Verify:
redis-cli ping
Expected:
PONG
Recommended production settings:
bind 127.0.0.1 ::1
protected-mode yes
Do not expose Redis publicly.
MIT
Pull requests and issues are welcome.
payload revalidate
Field-driven Next.js cache revalidation for Payload with id-keyed cached finders and a dependency map
59240/wk18v3
cached local api
Cache Payload Local API operations with Next.js unstable_cache and automatic tag-based revalidation
48112/wk335v3
payload upstash
Upstash Redis key-value adapter for Payload's built-in KV store
82333/wk7v3 v4
payload kv
Store counters, feeds and expiring data in Redis or KV stores while querying them as normal Payload fields
771.4k/wk0v3 v4
payload cache
Automatic Next.js 16 and Vercel cache tagging and invalidation for Payload reads
74321/wk0v3 v4
payload redis cache
Redis-backed cache layer for Payload API endpoints, keyed by user collection and request URL
48271/wk64v1