issue with CF serving stale (old) files after deploy
Answered
Northeast Congo Lion posted this in #help-forum
Northeast Congo LionOP
it happens every 3-5+ deployments, clearing cache helps, but it's not an option in pipeline. I figured that deploymenetId in next.config would fix it, but it doesn't seem to work in nextjs 16.2.2 and latest 16.1.x releases. Any suggestions?
Answered by 80ᄅ-ʎɐu∀
otherwise other option is completely skipping cache in HTML page, but it can also affect speed
11 Replies
Northeast Congo LionOP
&1089670008898080870 how to fix this issue?
there is option to purge cache
in cf dashboard
@80ᄅ-ʎɐu∀ Try clearing cache
Northeast Congo LionOP
it helps, but i cannot add a step to purge cache on every deployment or wait whether it fails or not after a deploy to manual clear it
i thought that setting deploymentId in next.config would fix it, but i still got the issue
app is running on multiple pods behind a load balancer
@Northeast Congo Lion it helps, but i cannot add a step to purge cache on every deployment or wait whether it fails or not after a deploy to manual clear it
Cloudflare actually has the page cached, so unless Cloudflare offers a different option for it, idt there is any other option rather than using the api to purge cache
Northeast Congo LionOP
ic, thanks
otherwise other option is completely skipping cache in HTML page, but it can also affect speed
Answer
@Northeast Congo Lion ic, thanks
can u mark solution