keycdn / cache-enabler

A lightweight caching plugin for WordPress that makes your website faster by generating static HTML files.
https://wordpress.org/plugins/cache-enabler/
123 stars 46 forks source link

Cache Enabler stops caching on WordPress update #273

Closed oh2fih closed 3 years ago

oh2fih commented 3 years ago

On several sites (but not all) Cache Enabler 1.7.2 suddenly stopped working and there is at least a temporal connection to the WordPress 5.8 update.

Symptoms:

Workaround:

  1. Disable the plugin and then re-enable it.
  2. Check that the directory wp-content/cache/cache-enabler/ is created (the .json also disappears).
  3. The HTML comment appears on the second page load.

To mass test URLs based on the HTML comment, I wrote a little Python script: test-cache-enabler.py.

coreykn commented 3 years ago

Are you able to replicate this issue when using a fresh install of Cache Enabler (version 1.7.2) and then upgrading to WordPress 5.8? I was unable to when doing this from WordPress 5.7.2 to 5.8.

In the past have you updated Cache Enabler from WordPress? Also, do you happen to know what version you updated from before version 1.7.2? I ask because the JSON file hasn't been used since version 1.5.0. The plugin update process was not handled the best in some older versions due to a caveat in the old handling. It did go through some improvements a couple times, and due to that caveat different results could have occurred unfortunately. In most cases it was not an issue, however, once in a while some installations required the plugin to be deactivated and activated again. That means I do not think it's specifically related to upgrading to WordPress 5.8, but the actual upgrade process that WordPress performs and how Cache Enable reacted to it. When version 1.8.0 will be released this should not be the case as we've completely changed how this is handled.

oh2fih commented 3 years ago

I couldn't replicate this on 5.7.2 to 5.8 upgrade, either. It might have happened earlier and only noticed now, or it might be related to a state left from some previous version, as suggested by the presence of the cache-enabler-advcache-example.com.json. As you have described, it seems the problem is already addressed on version 1.7.2 (and will change completely in version 1.8.0).