Hey everyone!
I am after ideas and tips to help solve the following issue.
I am using Litespeed LSCache plugin - not with quic.cloud - on Litespeed server and also a Cloudflare pro plan.
I am compressing and combining files on the WP site with the LSCache plugin and also have LSCache enabled (or disabled in order to troubleshoot).
On the Cloudflare side I have enabled the following:
Argo Smart Routing
Caching Level: Standard
Browser Cache TTL: Recently changed it to: Respect Existing Headers
Argo Tiered Cache: Recently re-enabled
Page Rules: Cache Level: Cache Everything for the front-end pages - But recently disabled that rule.
Speed Optimisation settings
Image Resizing: Off
Polish: Lossless + WebP
Auto Minify: Everything is off.
Brotli: On
Automatic Platform Optimization for WordPress: On + Cache By Device Type
Enhanced HTTP/2 Prioritization: On
Mirage: On
Rocket Loader: Off
Now the issue that I am facing is that from time to time, on certain pages, their assets files remain cached on Cloudflare, therefore the visitors browsers load those files, while that have expired and are non existent on my website/server anymore - returning a 404 error.
It seems that somehow the Litespeed Cache has purge them and generated new ones with a new URL, but Cloudflare still serves the old ones.
This is only a problem with combined, minified JS files so far, and not with any CSS files. This causes problems in using the front of the pages, since functionality is broken.
I have tried various different configurations but despite all my efforts, I am still experiencing similar issues. I have to go and Purge Cloudflare’s cache, in order to get a fresh copy of the pages’ content and links to their assets.
Since the problem occurs in some pages and only after some days and I need to keep searching the pages in order to spot if this has occurred, it makes it hard to tell what effects can specific configurations have - so overall it’s hard to re-produce, to debug and diagnose and reach to a solution.
Another thing to note is that the issue may not be occurring with all the browsers and maybe not all the users will encounter it (speaking for the same pages at the same time). So, I might be getting the issue with Chrome but not with Firefox and/or a customer might be getting the issue, while I am not.
I recently disabled the Cache Everything on CF and have purged all caches - but still getting pages with the issue.
So, I was hoping if I could get any helpful tips or other ideas, or suggestions for a proper configuration for the two technologies. I could even be confused and thinking or trying the wrong things - so I would appreciate any suggestion that would take me into the right direction.
I will post the same question at Litespeed forums, to see what I can get from there as well.