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 WP-CLI clear subcommand #111

Closed coreykn closed 4 years ago

coreykn commented 4 years ago

Update WP-CLI clear subcommand:

Update Cache_Enabler::clear_page_cache_by_post_id() to not check if $post_id is empty because this will be done when validating the parameter as an integer.

Update Cache_Enabler::clear_page_cache_by_url():

Update Cache_Enabler::clear_home_page_cache() to have an optional $blog_id parameter. This will allow the correct home page URL to be cleared when clearing a site cache in a subdirectory multisite network with WP-CLI. No parameter validation was added because this is currently handled beforehand.

Update Cache_Enabler::clear_blog_id_cache():

Update Cache_Enabler_Disk::_file_path():

Update Cache_Enabler_Disk::_get_settings() variables to be $blog_path instead of $path as we move to more specific variable naming.