APO is meant to cache static content HTML, and the presence of cookies tell it the content might not be static, even if it seems so to our eyes. You’re probably (I’m trying to guess here, it could be other cookies) running your tests with a logged-in browser tab.
That means you’ve successfully removed one issue, and now you are seeing what visitors will.
Still, it’s another layer of caching that makes troubleshooting more difficult. Can’t you turn off Nitro’s caching and use only its optimization settings, and see how that goes?
Also, the fact that now you’re seeing cf-cache-status: EXPIRED as opposed to BYPASS means your page is supposed to be cached, but something keeps telling APO that there’s new content, when in fact there isn’t. So the cache keeps being invalidated. You need to investigate why your origin keeps updating the last-modified: header when apparently there’s no new content.
My Host is telling me that LiteSpeed is disabled for my site but when I check it its showing that X-Litespeed-Cache: hit and X-Turbo-Charged-By: LiteSpeed
Could Cloudflare be running LiteSpeed somewhere where I dont know about it?
Did you show this to your host, and they insist it isn’t running?
No. LiteSpeed is running at your origin.
Check your cPanel or equivalent admin panel to see if you see options to enable/disable/config it. APO can run well with LiteSpeed, but the option to cache based on device needs tinkering.
LiteSpeed isnt a plugin by itself.
Unless its been bundled with another plugin that I’m not aware of.
But I’m not running anyother caching plugins.
Cloudflare (for APO)
NitroPack (for everything including caching)
RankMath (for SEO)
Smush Pro (for image optimisation)
Thrive Themes (as my my theme builder)
And a bunch of other plugins for various purposes
I might run through and deactivate the plugins to check if any of them is causing the issue
I did some more testing and discovered that there’s pretty much no rhyme or reason about when what cache gets triggered or skipped.
I created a screen recording about the situation here https://nimb.ws/YD0hlP
And it shows that on a page refresh there are a number of caches that could get triggered or skipped.
NitroPack support said the following in response to me showing them the above video.
Hi Terry!
Thank you for the update!
I have reviewed the matter, and I can confirm the same behavior, however, I’m not fully sure if something could be done on our end.
I will try to explain our integration and what its main function is.
Basically, what we use the API integration for is to make sure that the Caches are in synch. However, this is ensured by syncronizing the cache purge/invalidations requests and that is it. Typically when the cache is refreshed at the same time that means that each new cache no matter its origin, it will contain all tthe fresh data. This is the mechanism that we use to synchronize the caches via our integration.
On our end we cannot confirm why exactly the CF APO cache is behaving like this. I believe the best shot here will be to consult with the support of that feature or Cloudflare and ask them if something has been done incorrectly on the configuration’s end or to check for misbehavior in their service!
Kind regards,
Vasil D.
Technical Support at NitroPack
So right now I’ve got no idea who to speak to to get this resolved.
Please notice in your video how the Last-Modified timestamp changes for the same page when you refresh. This is telling APO there’s new content, when apparently there isn’t.
Our Developers are advising us to check with Cloudflare why this is happening, and after the issue with the APO is resolved and there is something related to NitroPack, we can check again.
Kind regards,
So it seems that for some reason APO is causing the issue