Litespeed + CloudFlare cache – Expired JS files
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
**Speed Optimisation settings**
Image Resizing: Off
Polish: Lossless + WebP
Auto Minify: Everything is off.
Automatic Platform Optimization for WordPress: On + Cache By Device Type
Enhanced HTTP/2 Prioritization: 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.
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 posted this exact same question at CloudFlare’s forum to get feedback from there too.
- The topic ‘Litespeed + CloudFlare cache – Expired JS files’ is closed to new replies.