Skip to content

feat(core): Replace Vercel KV adapter with Vercel Runtime Cache #2439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: canary
Choose a base branch
from

Conversation

bookernath
Copy link
Contributor

@bookernath bookernath commented Jun 18, 2025

What/Why?

  • Refactor middleware caching implementation for with-routes to use the new Vercel Runtime Cache API, which drastically simplifies things for customers hosting on Vercel
  • Remove Vercel KV and BC KV adapters (no longer needed), but keep the Upstash KV adapter as a fallback option for customers in other environments
    • We made add a Redis adapter as well in another PR, but it requires Node.js middleware and is therefore a more significant change.
  • Remove SWR-like behavior in with-routes to use simple, but long, TTLs for caching route & status info
  • Bump Next canary version to latest

Testing

Migration

If you are hosting on Vercel, you can simply remove your env variables related to Vercel KV, if you're using it. If you're using Upstash Redis on Vercel, you can un-install it from your project.

If you are hosting outside Vercel, use Upstash Redis or implement a Redis adapter layer.

@bookernath bookernath requested a review from a team as a code owner June 18, 2025 04:58
Copy link

changeset-bot bot commented Jun 18, 2025

🦋 Changeset detected

Latest commit: a069fc5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jun 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-canary ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 1:59am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) Jun 19, 2025 1:59am
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Jun 19, 2025 1:59am
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Jun 19, 2025 1:59am

@bookernath bookernath changed the title Runtime cache Replace Vercel KV adapter with Vercel Runtime Cache Jun 18, 2025
@bookernath bookernath changed the title Replace Vercel KV adapter with Vercel Runtime Cache feat(core): Replace Vercel KV adapter with Vercel Runtime Cache Jun 18, 2025
@bookernath bookernath marked this pull request as draft June 18, 2025 15:55
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