How are you checking the first contentful paint?
Using Lighthouse, but it’s easy to spot directly since there’s such a big difference in loading time.
And also since the pages are also cached in the Browser, have you tried enabling the Set expires header and cache control header in the Browser Cache section?
If the BC is disabled, every time you close and re-open the browser, the browser needs to go and fetch the new set of pages even when those are cached.
Yes browser cache is disabled, and I still have the same issue if I leave my browser open for an hour or two.
You can check the timestamp in the /cache/folder for any cached page.
So I ran a little test.
I purged all cache at 3pm and refreshed my homepage. The timestamps were then as shown here.
I then did nothing for 15 minutes. Then I refreshed my homepage and it refreshed instantly. My timestamps afterwards were than as shown here.
I then did nothing until 5pm. Just before refreshing the homepage, I decided to check my timestamps again. They were as shown here. I then refreshed my homepage. It instead took five seconds to reload (the same time it would take if I disabled this plugin). The timestamps were then as shown here.
(I refreshed all of the pages above in incognito mode so that I was a visitor rather than a logged-in user.)
A few questions about the above results:
1) When I purged all cache at 3pm and then refreshed my homepage, why did the timestamp on the “page-enhanced folder” not update? I have page caching enabled and “Don’t cache front page” disabled, as shown here. Is it because as there was no changes to any of my website, the plugin knew this and therefore didn’t see any reason to change the files in the folder, even though I asked it to purge the files in the folder?
2) My db and object cache folder seem to be updating in the background, even if I’m not on my computer and even though my site is not live and therefore has no visitors. Is that expected behaviour?
3) My homepage reloaded instantly at 3:15pm but reloaded slowly at 5pm. The only difference appears to be that the db folder updated for the latter and not the former. So the reason for my longer load times if I wait an hour or two is my database cache appears to be getting purged in between, is that right? Here are my settings for my database cache. If I don’t want to have these 5 second delays for at least e.g. a week, do I have change one (or both) of these numbers to a week?
Now if you have any suspicions that the cache is being purged, you can check the purge logs that are available in the Performance>General settings>Debug section and select Page Cache.
I was planning on including the debug info at each timestamp and then completely forgot to do it! I’ll post that info in a few hours.
Thanks again!
-
This reply was modified 2 years, 7 months ago by
Ari123.