How does genereateStaticParams actually work?
Unanswered
Little fire ant posted this in #help-forum
Little fire antOP
Hey, so I have a page where I use generateStaticParams, so it prebuilds the page and should(??) be static before I use revalidatePath. right? but even tho i don't use revalidatePath, when I change anything in the cms and refresh the page, the data will be fresh...
What am I doing wrong?
What am I doing wrong?
1 Reply
Roseate Spoonbill
Using search params opts the page out of the full route cache. I'd observe the output of the build command to see how next treats your page to learn whether it will be static or not. It is helpful when trying to utilize conflicting rules like
You could however utilize fetch cache, to keep data cached, while still having
generateStaticParams
vs searchParams
You could however utilize fetch cache, to keep data cached, while still having
searchParams
in use for that page. Your page will still be rendered on the server, but responses from the api will be cached, causing much faster render.