[@vercel/blob] Deprecate useCache option on get() to a no-op#1075
Open
falcoagustin wants to merge 1 commit into
Open
[@vercel/blob] Deprecate useCache option on get() to a no-op#1075falcoagustin wants to merge 1 commit into
falcoagustin wants to merge 1 commit into
Conversation
The backend no longer honors the cache=0 query parameter that useCache: false produced, so the option had no effect. Gut the implementation (reads always go through the standard caching path) and remove its tests. The typed option is kept and marked @deprecated so existing callers compile without error; it will be removed in a future major version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 9dea88e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Problem
The
useCacheoption onget()worked by appending acache=0query parameter to the fetch URL when set tofalse, instructing the backend to bypass the CDN cache and read directly from origin storage. The backend no longer supports this —cache=0is now ignored — so the option silently does nothing.It shipped in
@vercel/blob@2.4.0as part of the beta private-storage feature.Solution
Make
useCachea no-op:cache=0URL-construction logic;get()always fetches the plain blob URL through the standard caching path.useCache?: booleanfield onGetCommandOptionsbut mark it@deprecated, so existing callers still compile rather than hitting a type error. It can be removed in a future major version.cache=0behavior.minorchangeset (deprecation, not a breaking removal). Type-check and the 156 node tests pass.🤖 Generated with Claude Code