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

update handling of trailing slash and advcache #91

Closed coreykn closed 4 years ago

coreykn commented 4 years ago

Update the handling of trailing slashes to allow the cache to be bypassed if the permalink structure is with or without a trailing slash (#85). Set the permalink_trailing_slash advanced cache setting to false if trailing slash has not been set in the Permalink Settings.

Update settings page save actions to have "Save Changes" and "Save Changes and Clear Cache" buttons. Allows the ability to save the settings without completely clearing the cache. Inspired by the lovely folks working on Autoptimize. This prevents unwanted cache clearing when creating the advanced cache settings file.

Update the _install_backend() method to not clear the cache. The cache should not be cleared when installing requirements, like on activation or if a new subsite is added.

Update the requirements_check() method to not define $options variable because it can be accessed through the default vars. Update CE_MIN_WP constant to 4.6.

Update the handling of the advanced cache settings file:

Fix advanced cache file not unlinking on plugin deactivation by updating the clear_total_cache() method to not update the advanced cache file. This is only required when the Cache Enabler plugin is updated.

Fix how WooCommerce is being checked if active so the product stock Cache Behavior setting is visible even when network activated.

Fix on_uninstall() to actually uninstall on each subsite if network activated. Previously only the main site was being uninstalled. Using $_GET['networkwide'] is not an available attribute when Cache Enabler is uninstalled (deleted) so it always returns false. For uninstalling on multisites only checking is_multisite() is required because plugins must be deleted from the network admin.

Extend the Cache Behavior by allowing the cache to be completely cleared if a plugin has also been activated or deactivated in addition to being updated (#86).

Fixes #85 Closes #86