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 cache clearing #215

Closed coreykn closed 3 years ago

coreykn commented 3 years ago

Add cache clearing behavior for when one or more themes are updated. This new behavior will now automatically clear the site cache if the active or parent theme has been updated.

Update cache clearing behavior for when one or more plugins are updated. This will now only take place when the update process is actually plugin as it was intended. This would have previously cleared the site cache whenever the upgrader_process_complete action hook was fired and the associated setting was enabled, regardless of the type of update process (e.g. plugin, theme, translation, or core). Update that associated setting to now only clear the site cache when a plugin is activated or deactivated as Cache Enabler will now automatically handle cache clearing when a plugin has been updated.

Update cache clearing for theme switching to clear the site cache instead of the complete cache. This change makes it so when a theme is switched in a multisite network only that site cache is cleared instead of the entire network since this is done on a site level and not network level. This has no effect on single site installations.

Update instances of in_array() to use strict checks to prevent odd results in some cases. Further, our standard has been to use strict comparisons unless a loose comparison is required.