Cloudflare serving old cache on nextjs app even after purge

What is the name of the domain?

www.example.com

What is the error number?

No error number

What is the error message?

No error message

What is the issue you’re encountering

My index page is only serving old cache even after purging the cache multiple times.

What steps have you taken to resolve the issue?

I have added multiple cache rules and page rules, to try to bypass the cache. Tried development mode, NOTHING. NextJS generates new files per each build, and now the cache is stuck on a very old one and I am unable to update the page. Tried to force and add these values on my next.config.mjs file, key: 'Cache-Control', value: 'no-store',.
I am hosting on digital ocean. This is driving me crazy, nothing works and my users are stuck with the old version

What are the steps to reproduce the issue?

I do not think there is steps to reproduce. Since the cache is created by country, when opened by VPN it loads fine, so I dont believe you’ll be able to see it.
I will provide some screenshots. One is from the domain, one is from the preview app digital ocean generates for you.

Screenshot of the error

This is the file it is failing to retrieve

In both your screenshots, the cf-cache-status is DYNAMIC which means the page is not cached by Cloudflare and was requested from the origin. If you can give the domain then it’s easier to check.

There is a X-Nextjs-Cache: HIT though from your origin.

If unsure, pause Cloudflare or set the DNS record to “DNS only” and see what you are served then.

1 Like

Does that mean there is clash between the nextjs cache and cloudflare?
www.te-pathenat.com

image
does this mean my users are stuck with a1 year old cache?

This topic was automatically closed after 15 days. New replies are no longer allowed.