For Workers & Pages, what is the name of the domain?
Cloudflare Workers - Nextjs ISR not working
What is the issue or error you’re encountering
Nextjs ISR app is not update after revalidate time.
What are the steps to reproduce the issue?
My app is not update after revalidate time, still display same data as before.
I use this fetcher:
const res = await fetch(route, {
next: { revalidate: 5 },
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
});
I also add revalidation to page - export const revalidate = 5;
This is my wrangler.toml configuration.
main = ".open-next/worker.js"
name = "nextjs-app"
compatibility_date = "2024-09-23"
compatibility_flags = ["nodejs_compat"]
assets = { directory = ".open-next/assets", binding = "ASSETS" }
[[kv_namespaces]]
binding = "NEXT_CACHE_WORKERS_KV"
id = "f73b644cc80243f7a8bbcaca7eebb72e"
Build and deploy script:
npx opennextjs-cloudflare
npx wrangler deploy