Vercel Blob now supports consistent reads on private storage
Mirrored from Vercel — AI for archival readability. Support the source by reading on the original site.
Vercel Blob now supports consistent reads on private storage. Pass useCache: false to get() or presignUrl() for a read that reflects the latest write.
A blob written to a fresh pathname has no existing cached entry, so reads reflect the latest write immediately. When you overwrite a blob at an existing pathname, readers might see the cached version for up to 60 seconds.
When a read must reflect the latest write, like an agent's memory file, a session transcript, or a scheduled JSON report, pass useCache: false. These reads bypass the CDN, take longer than cached reads, and incur Fast Origin Transfer.
import { put, get } from '@vercel/blob';
await put('reports/latest.json', JSON.stringify(report), { access: 'private',You can also bypass the cache without the SDK. Under the hood, useCache: false adds a cache=0 query parameter to the request. You can set it yourself on a private blob URL:
curl "https://<store-id>.private.blob.vercel-storage.com/file.json?cache=0" \ -H "Authorization: Bearer $BLOB_READ_WRITE_TOKEN"Install the latest @vercel/blob SDK for consistent reads:
Learn more in the consistent reads documentation.
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.