For static site, build is successful but cache doesnt get cleared properly

I tried several deploys, via github, manually and manually with clean build cache. In all cases, the build is reported as successful. However, the content doesn’t show up properly.

HTTP header last-modified says 8 Jan, whereas content on that page was definitely edited in the past few minutes (on 9 Jan).

Trying the same URL but adding a random querystring param (cache buster) shows the right content. This says that the cache is at fault here.

How can we manually or programmatically clear the cache?

1 Like

Same issue here. Adding cache buster displays correct content. Seems to be limited to the index page.

I saw this issue last night as well. Index page only. Eventually the cache refreshed but it was hours later.

@Rajeev_J_Sebastian @justinsantoro @michaelsmanley
Does the issue still exist?
If yes, we need to check with our CDN provider.

Just to clarify, my pages were not refreshed even a couple of days later.

@Hao-Ji_Wu please do check your DM for more info.

We are using Next.js (next export) on a static site and intermittently getting this error. What happens is our index.html will point at the prior deploy’s JS bundles, causing a blank page to load. Wondering if this is an issue with Render’s Cloudflare configuration?

We have tried the “Clear build cache and deploy” option, but this issue still persists even after doing that (although it temporarily fixes it).

Hi Zach,

Render caches certain things between builds as well. Does the issue persist if you do a manual deploy and select “Clear build cache and deploy”?

Hey Tyler,

Yes, this issue persists even after a manual “clear build cache and deploy”.

I’ve opened a separate issue with a bit more detail of what’s happening in our case.

I have noticed that my site randomly reverts back to an earlier build. Might be a related issue?

1 Like

Hi all,

If possible, can you share the asset names that returned a 404 and any additional error messages or request details to help us debug this further?

1 Like

Hi all,

We have mitigated the issue. You shouldn’t see any 404s in the future, and your sites should be serving the latest assets. You do not need to clear the build cache to see the correct behavior.

1 Like

Awesome, thanks for looking into this!