Next.js Discord

Discord Forum

Data cache seems to doesn't work in my static server component page

Unanswered
e.ciuffetelli posted this in #help-forum
Open in Discord
Hi,

I'm using Next.js 14 to build a static articles blog. I used server components with the generateStaticParams function, passing all the article slugs to it. I fetch the data from a database using the Fetch API and use tags to revalidate the cache. The app is deployed on Vercel, and the build logs show that all relevant pages are SSG.

However, when I change data in the database and refresh the page, the data updates immediately without revalidating the cache. How is this possible? What am I missing?

I use searchParams for pagination and filtering, so I suspect this might be causing the issue. What's the best way to handle this?

0 Replies