Next.js Discord

Discord Forum

How can I debug App Router's fetch caching? Can I get the logs back?

Answered
South Polar Skua posted this in #help-forum
Open in Discord
South Polar SkuaOP
Hi

I would like to see if what requests have been cached or not during development.

Back in July (early 13.4 versions of Next.js) had logs that showed if a fetch request has hit the Next.js cache or not. Is there a way to show those logs again?
Or is there a better way to debug the caching behavior?

Thanks in advance!
Answered by joulev
try this in next.config.js
experimental: {
  logging: {
    level: 'verbose'
  }
}
View full answer

5 Replies

Answer
South Polar SkuaOP
Thank you! That did it 🙂

I forgot to mention that I'm on 13.4.19 . There it's
experimental: {
  logging: 'verbose'
}

btw.
Is it somewhere documented? I haven't found anything in the official docs.
@South Polar Skua Is it somewhere documented? I haven't found anything in the official docs.
not that i know of. i only know about this after seeing some members here talking about it
i think they will announce this and start documenting it in the conf