Next.js Discord

Discord Forum

Can I have the app router set Cache-Control with a max-age > 0?

Unanswered
Upland Sandpiper posted this in #help-forum
Open in Discord
Upland SandpiperOP
I'm running Vercel behind Cloudflare and would like CF to prevent scraping and also cache some of my static pages. At the moment, however, it looks like all the Vercel responses are sent out with max-age=0, even though all the fetch requests in the app have {next: revalidate: 10000}. I assumed that Next would derive a cache lifetime from that cache info - is there a more explicit way to set it?

5 Replies