Add cache clearing behavior to clear the site cache. Update most places with this new behavior instead of clearing the complete cache. This fixes a couple issues in multisite networks, like how the settings for one site can clear the complete network cache, regardless of how other sites are configured. The same could happen when choosing to clear the cache when saving the settings on any site in the network. The changes introduced to Cache_Enabler::clear_site_cache_by_blog_id() in PR #164 allows this to be handled in one way for both single and multisite installations. This change will reduce how often the ce_action_cache_cleared action hook is being fired, however, the upcoming hook changes will take this into account and will improve indicating what has actually been cleared.
Remove clearing the cache from Cache_Enabler::on_uninstall() because this is done on plugin deactivation.
Remove error control operator when scanning the directory in Cache_Enabler_Disk::get_dir_objects() because checking if the directory exists now always occurs before this method is called. This has not been added to the method itself as there are currently a few methods that rely on whether or not the directory about to be scanned exists.
Add cache clearing behavior to clear the site cache. Update most places with this new behavior instead of clearing the complete cache. This fixes a couple issues in multisite networks, like how the settings for one site can clear the complete network cache, regardless of how other sites are configured. The same could happen when choosing to clear the cache when saving the settings on any site in the network. The changes introduced to
Cache_Enabler::clear_site_cache_by_blog_id()
in PR #164 allows this to be handled in one way for both single and multisite installations. This change will reduce how often thece_action_cache_cleared
action hook is being fired, however, the upcoming hook changes will take this into account and will improve indicating what has actually been cleared.Remove clearing the cache from
Cache_Enabler::on_uninstall()
because this is done on plugin deactivation.Remove error control operator when scanning the directory in
Cache_Enabler_Disk::get_dir_objects()
because checking if the directory exists now always occurs before this method is called. This has not been added to the method itself as there are currently a few methods that rely on whether or not the directory about to be scanned exists.