Preload mode skips caching pages or deletes already cached pages
-
My issue seems similar to these reports about cache files either not being created, or being created but shortly thereafter deleted:
https://wordpress.org/support/topic/preload-mode-enabled-but-cache-files-disappear/
https://github.com/Automattic/jetpack/issues/25467
https://wordpress.org/support/topic/preload-only-caching-1-3-or-posts/
I’m on WordPress 6.1.1 with PHP 8.2 FastCGI.
In my case, starting with an empty cache, preload mode skips some pages, sometimes large groups of pages, while working. It continues to skip some of these even on subsequent runs.
Furthermore, with preload mode on, the plugin seems to have a mind of its own. It deletes pages that are supposed to be supercached, seemingly at random. The number of pages that disappear at one time can be anywhere from tens to nearly the entire cache (about 1000 pages for me). This seems to happen most often right after a preload cycle completes.
As has been suggested, I removed the bots from Rejected User Agents to help get missing files cached more quickly, but this is not a solution to the underlying problem.
I also tried disabling garbage collection (setting Cache Timeout to 0), even though my understanding is that in preload mode this setting should be irrelevant. This seems to have no effect.
I came across reports of two unrelated edge case bugs, both resulting from the Yoast SEO plugin, which potentially explain the behavior I see.
The first edge case is Yoast triggering a complete cache purge when Yoast updates to a new version, reported here: https://wordpress.org/support/topic/cache-flushing-on-update/
This behavior is not supposed to happen, but I observed it multiple times, including the previous two updates on March 1 and 3. Apparently, Yoast includes triggers for a full purge specifically for WP Super Cache and W3 Total Cache, but this is only supposed to occur when Yoast is activated or deactivated, or potentially when changing some settings.
The second edge case is more pernicious, and will definitely need a debug review. Someone reported that an interaction between Yoast’s use of an organization image in creating schema markup was causing Super Cache to purge individual pages immediately after they were cached: https://wordpress.org/support/topic/wp-super-cache-and-yoast-seo-incompatible/
I had no image set. (For my schema, I am a person, not an organization, but I assume it works the same way.) After I set one, the problem appears to be less pronounced, but this is only from anecdotal observation. Before the change, I would see the cached page count in the WP Super Cache UI drop between 20-50% immediately after a preload completed, when the “Cleaning up old supercache files.” email is sent. After the change, the count only drops 10-20%.
TO DO:
Run debug mode during preload and report findings.
- The topic ‘Preload mode skips caching pages or deletes already cached pages’ is closed to new replies.