Menu

Vercel Blob now supports consistent reads on private storage - Vercel
📰

Vercel Blob now supports consistent reads on private storage - Vercel

Vercel News·Agustin Falco·5 days ago
#z08BO2C7
#vercel#blob#latest#json#reads
Reading 0:00
15s threshold

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' ,

} ) ;

// New blobs are read-after-write consistent: this read reflects the fresh write

let result = await get ( 'reports/latest.json' , { access : 'private' } ) ;

// Overwrite the report at the same pathname

await put ( 'reports/latest.json' , JSON .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.