Next.js Discord

Discord Forum

Knowing when a request is cached by Vercel Data Cache

Unanswered
Large oak-apple gall posted this in #help-forum
Open in Discord
Large oak-apple gallOP
To help debug issues with stale data, I've added a metadata field to the result of any fetch call that lets me know if the object was found in our Redis cache, or if a fresh API call was made.

Similarly, I was wondering if there was a way to know if Vercel Data Cache had intercepted a fetch call and returned its own cached value instead of making the actual request?

0 Replies