Next.js Discord

Discord Forum

A way to see if data is fetched from cache or fetched from db

Answered
@ts-ignore posted this in #help-forum
Open in Discord
I wrapped by prisma fetch call in a unstable_cache, is there a way to see if the data I am getting is returned from the cache or is being fetched
Answered by Plott Hound
Put a console log inside the fetch that triggers whenever it’s called. That’s what I do and works well
View full answer

2 Replies

Plott Hound
Put a console log inside the fetch that triggers whenever it’s called. That’s what I do and works well
Answer
Thanks, that seems to work