Caching updates from Next14 to 15 regarding `revalidate`
Unanswered
Chien Français Blanc et Noir posted this in #help-forum
Chien Français Blanc et NoirOP
In my API routes I got into the habit of doing:
export const revalidate = 0
at the top of the file due to the fact that GET requests were cached automatically in Next14. But now that Next 15 you have to specifically opt-in to caching GET routes on route handlers, does that mean I can safely remove these revalidate = 0
config settings on each of my api routes?2 Replies
Chien Français Blanc et NoirOP
I was trying to reference here: https://nextjs.org/blog/next-15#get-route-handlers-are-no-longer-cached-by-default
yeah, I tried this on a new project and it seems like it. You can savely remove revalidate = 0 and it will be dynamic by default.
https://x.com/alfonsusac/status/1867747169710772389
https://x.com/alfonsusac/status/1867747169710772389