Help with revalidating pages.
Unanswered
itsMU1X posted this in #help-forum
itsMU1XOP
my page is caching my mysql values, and after a specific time revalidate the page
is there's a config or something for this? using next 13.4 app directory with server component.
i guess i don't have to put codes here, i need to know how to let next.js in every request to make a fresh page.
is there's a config or something for this? using next 13.4 app directory with server component.
i guess i don't have to put codes here, i need to know how to let next.js in every request to make a fresh page.
11 Replies
itsMU1XOP
please mention if you replied
@itsMU1X my page is caching my mysql values, and after a specific time revalidate the page
is there's a config or something for this? using next 13.4 app directory with server component.
i guess i don't have to put codes here, i need to know how to let next.js in every request to make a fresh page.
revalidate at every request? then
revalidate after t seconds? then
see [the documentation](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#revalidate)
export const revalidate = 0revalidate after t seconds? then
export const revalidate = tsee [the documentation](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#revalidate)
@joulev revalidate at every request? then `export const revalidate = 0`
revalidate after t seconds? then `export const revalidate = t`
see [the documentation](<https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#revalidate>)
itsMU1XOP
but in the documentation the example for the fetch and the route apis is that will work for a page?
page.tsx?ohhhh
yeah just put
export const revalidate = 0 instead of false (default value)itsMU1XOP
omg i'm an idiot
then all requests won't be cached
@joulev then all requests won't be cached
itsMU1XOP
i saw that, i just saw the last one, and yep it works thank you budd
np youre welcome