Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(kv): Switch to `default` for fetch `cache` option BREAKING CHANGE: When using Next.js and `vercel/kv`, you may have `kv` requests and/or Next.js resources using kv being cached when you don't want them to. If that's the case, then opt-out of caching with https://nextjs.org/docs/app/api-reference/functions/unstable_noStore. On the contrary, if you want to enforce caching of resources you can use https://nextjs.org/docs/app/api-reference/functions/unstable_cache. Explanation: Before this commit, every `kv` fetch request was made with the `cache: no-store` option of fetch (https://developer.mozilla.org/en-US/docs/Web/API/Request/cache). Next.js uses the fetch cache behavior as part of data caching (https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#caching-data). `no-store` was added by `upstash/redis` in a way to enforce `kv` queries to never be cached. But in some situations you do want them to be cached/and or the underlying Next.js resources to be cached. This change made it hard to opt-out of no-store (#213). The Next.js team recommended we switch to `default` and let users opt-in/out from Next.js cache. If you're not using Next.js this should have no impact on you. fixes #213 * Create stale-stingrays-hunt.md
- Loading branch information
d85bb76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vercel-storage-next-integration-test-suite – ./
storage-rho.vercel.app
vercel-storage-next-integration-test-s-git-14bcac-curated-tests.vercel.app
vercel-storage-next-integration-test-suite-curated-tests.vercel.app