Repository navigation
Conversation
…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
Contributor
|
Docs7 for upstash.com
Commit |
…the caching guides
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
redis/tutorials/nextjs_self_hosted_caching): acacheHandlers.remotehandler for"use cache: remote"(Next.js 16), with tag revalidation viarevalidateTag/updateTag. An optional section adds acacheHandlerfor ISR, thefetchcache andunstable_cache.redis/tutorials/nuxt_nitro_caching): points Nitro'scachestorage mount at the unstorageupstashdriver, sodefineCachedFunction,defineCachedEventHandlerandswr/cacheroute rules are shared. Covers expiry, invalidation and dev storage.redis/tutorials/nestjs_caching):CacheModulewith a@keyv/redisstore,CacheInterceptor, and manualCACHE_MANAGERget/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.jsonunder 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:
removeItem, cachedel) applies to the other.Versions: Next.js 16.4, Nuxt 4.6 / Nitro 2.13, NestJS 12 with cache-manager 7.
mint broken-linksreports nothing for the new pages. The Docker sections were not tested.