Next.js Discord

Discord Forum

Next 14 server side request caching issue

Answered
American Wirehair posted this in #help-forum
Open in Discord
American WirehairOP
hey, im trying to disable caching for server side requests in my next 14 app. i've tried adding
cache: "no-store",

and
next: { revalidate: 0 },

but now the pages are not even responding on production. how can I disable caching
Answered by B33fb0n3
you can add
export const dynamic = 'force-dynamic'

to your page to make your page in every cace dynamically rendered. Iirc that would also stop the caching of fetch functions
View full answer

4 Replies

@American Wirehair hey, im trying to disable caching for server side requests in my next 14 app. i've tried adding cache: "no-store", and next: { revalidate: 0 }, but now the pages are not even responding on production. how can I disable caching
you can add
export const dynamic = 'force-dynamic'

to your page to make your page in every cace dynamically rendered. Iirc that would also stop the caching of fetch functions
Answer
American WirehairOP
I guess it worked, thank you.
Happy to help