Next.js Discord

Discord Forum

dynamic = "force-dynamic" with strange cache

Answered
New Guinea Freshwater Crocodile posted this in #help-forum
Open in Discord
New Guinea Freshwater CrocodileOP
I use dynamic = "force-dynamic" on my base layout to make my app full SSR but on some pages i always have some cached data like, on the first load. If i reload the page then the content appears. Is it a normal behavior or not? Of course I want my data to be up to date, and some cache is cool but not this way. Is the use of dynamic my error or something else went wrong here? (BTW I use Directus API to fetch my data and never face this behavior on Nextjs 12)
Answered by New Guinea Freshwater Crocodile
If someone run into this problem it was my build that create this problem. So delete it resolve my problem.
rm -rf .next
View full answer

3 Replies

New Guinea Freshwater CrocodileOP
here is an example:
https://adacadabra.fr/vous
If you reload the page you can notice the image change. And the new image is the right one while the first one was an old one.
New Guinea Freshwater CrocodileOP
If someone run into this problem it was my build that create this problem. So delete it resolve my problem.
rm -rf .next
Answer