Next.js Discord

Discord Forum

Api route caching on vercel? Shows always same response

Answered
style posted this in #help-forum
Open in Discord
Hey I got route like that https://mystb.in/ShannonSceneAboriginal,
on development it works fine, shows me random response, but on Vercel it shows always the same response. Whats wrong?
Answered by fuma
Because the response of GET route handlers is cached by default, you can opt out of caching by adding segment config export const revalidate = 0;
View full answer

2 Replies

Because the response of GET route handlers is cached by default, you can opt out of caching by adding segment config export const revalidate = 0;
Answer
thank you!