Skip to content

docs(redis): self-hosted caching guides for Next.js, Nuxt/Nitro and NestJS - #1025

Open
CahidArda wants to merge 4 commits into
mainfrom
DX-3313-self-hosted-caching
Open

CahidArda wants to merge 4 commits into
mainfrom
DX-3313-self-hosted-caching

Conversation

@CahidArda

@CahidArda CahidArda commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Adds three Redis tutorials for apps that run on several self-hosted instances (Docker, Kubernetes, Railway, Render, Fly.io). In that setup each framework's built-in cache lives per instance, so every instance starts cold and computes the same values again. Each guide backs the framework's own caching API with Upstash Redis so all instances share one cache.

  • Self-hosted Next.js Caching (redis/tutorials/nextjs_self_hosted_caching): a cacheHandlers.remote handler for "use cache: remote" (Next.js 16), with tag revalidation via revalidateTag / updateTag. An optional section adds a cacheHandler for ISR, the fetch cache and unstable_cache.
  • Nuxt & Nitro Caching (redis/tutorials/nuxt_nitro_caching): points Nitro's cache storage mount at the unstorage upstash driver, so defineCachedFunction, defineCachedEventHandler and swr / cache route rules are shared. Covers expiry, invalidation and dev storage.
  • NestJS Caching (redis/tutorials/nestjs_caching): CacheModule with a @keyv/redis store, CacheInterceptor, and manual CACHE_MANAGER get/set/del with invalidation on write.

Each page links to its runnable example in upstash/redis-js (added in upstash/redis-js#1496; merge that first so the links resolve).

The pages are added to docs.json under Redis → Tutorials, after the Laravel caching page.

Testing

Every code block was run against an Upstash Redis database with two server instances of the same build:

  • A value cached by one instance is served by the other.
  • Entries expire after their TTL.
  • Invalidation on one instance (tag revalidation, storage removeItem, cache del) applies to the other.

Versions: Next.js 16.4, Nuxt 4.6 / Nitro 2.13, NestJS 12 with cache-manager 7. mint broken-links reports nothing for the new pages. The Docker sections were not tested.

…estJS

Add tutorials that share each framework's cache across several self-hosted
instances by backing it with Upstash Redis:
- Next.js: cache handlers for "use cache: remote" and the ISR/fetch cache
- Nuxt/Nitro: the cache storage mount on the unstorage upstash driver
- NestJS: cache-manager with a Keyv Redis store
@linear-code

linear-code Bot commented Nov 18, 2026

Copy link
Copy Markdown

DX-3313

@context7

context7 Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Docs7 for upstash.com

Result Status Action
Deployment ✅ Ready Open preview
Content review ✅ Passed. No problems found. —

Commit 87e1faa · Updated 2026-11-18 14:27 UTC · View build details

This branch was successfully deployed

1 active deployment
Docs7 Preview: DX-3313-self-hosted-caching — 87e1faa9 Deployed Nov 18, 2026 by context7[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant