stale-while-revalidate has a default time? #74735
-
I would to set stale-while-revlidate, but, in NextJs offical Docs, part of next.config -> headers -> Cache-control said 'you cannot set headers in next.config.js'. Then 'stale-while-revlidate' has a default time?? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
The Could you try to explain what is it you are trying to do? stale-while-revalidate, on which assets? There's a expireTime option in the config as well, but I am not sure that's what you need, https://nextjs.org/docs/app/api-reference/config/next-config-js/expireTime |
Beta Was this translation helpful? Give feedback.
Yes it is, I wonder if your page is being opted-in to dynamic rendering? When you build your app, there is a summary of what type of page is page is, are your pages having the correct output?
Also the staleTimes thing, is for client side routing caching.
Please don't forget to mark as answered if you are satisfied.