Next.js Discord

Discord Forum

Need Help with disabling data caching.

Unanswered
Catalan Sheepdog posted this in #help-forum
Open in Discord
Original message was deleted.

14 Replies

@joulev <https://nextjs.org/docs/app/building-your-application/caching#opting-out-2>
Catalan Sheepdog
how can I opt out when I am using fetch()?
@Catalan Sheepdog how can I opt out when I am using fetch()?
Using the dynamic = 'force-dynamic' or revalidate = 0 route segment config options: This will skip the Full Route Cache and the Data Cache. Meaning components will be rendered and data fetched on every incoming request to the server. The Router Cache will still apply as it's a client-side cache.
At the bottom
Anywhere where an export statement is valid
@joulev At the bottom
Catalan Sheepdog
can you share me any example repo?
@Catalan Sheepdog can you share me any example repo?
I don’t have any but just put export const revalidate = 0 at the bottom
It’s a segment config option
Catalan Sheepdog
I just added this add the bottom but didnot worked
@joulev I don’t have any but just put `export const revalidate = 0` at the bottom
Catalan Sheepdog
also tried this, no effect.
Show me a minimal reproduction repository then
Catalan Sheepdog
can we arrange a virtual meeting? I will share my screen, show you my project.
no. make a github or a codesandbox or similar that i can see the code and clone and debug