Next.js Discord

Discord Forum

React Cache call not respected upon build

Unanswered
Siberian posted this in #help-forum
Open in Discord
Avatar
SiberianOP
Hi,

I have a page where I have a duplicate DB call for generating the metadata and actually loading the page. I'm statically generating the page via generateStaticParams. I wrapped my DB call (a function calling prisma) in React's cache, and this works fine when a user goes to a page that's not cached. However, when building it seems like the query still runs twice. Is this to be expected?

0 Replies