Replies: 1 comment 3 replies
-
|
Could you share your file tree? I think you might want to look into |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment




Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I recently upgraded a previous Next.js project from version 15 to 16, enabled cacheComponent, and replaced dynamic and revalidate according to the official documentation.
But I found their behavior inconsistent. My blog page previously used dynamic and revalidate, and it would correctly return s-max-age and swr.
Then I applied "use cache" for all layouts of this page, including the page itself, just as described in the documentation.
However, I found that it still returns "no-store". The only way to get it to include caching is to use generateStaticParams (but it only returns the provided parameters since this happens at build time). Previously, I didn’t use generateStaticParams and just used force-static to achieve this.
I want to know what the equivalent implementation is now?

Please note: after I build and then start with debug cache enabled, it does generate a cache. My issue is with the cache-control header in the HTTP response, because if it is set to no-store, the CDN in my production environment will not cache it.
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions