If WordPress is installed in a subdirectory and the Site Address (URL) setting is different than the WordPress Address (URL) setting the wrong URL will be retrieved when clearing the home page cache through Cache_Enabler::clear_home_page_cache() or site(s) cache by blog ID through Cache_Enabler::clear_blog_id_cache(). This would lead to unsuccessful cache clearing in those events.
If the hosts are different then an incorrectly named advanced cache settings file would be created in wp-content/plugins/cache-enabler/settings. This would lead to the Cache Enabler settings not working when the cache is handled by the advanced cache.
Solution would be using get_home_url(), which gets the Site Address (URL) setting, instead of get_site_url(), which gets the WordPress Address (URL) setting. The Site Address (URL) setting is where the front end is accessible and will determine the cache structure.
If WordPress is installed in a subdirectory and the Site Address (URL) setting is different than the WordPress Address (URL) setting the wrong URL will be retrieved when clearing the home page cache through
Cache_Enabler::clear_home_page_cache()
or site(s) cache by blog ID throughCache_Enabler::clear_blog_id_cache()
. This would lead to unsuccessful cache clearing in those events.If the hosts are different then an incorrectly named advanced cache settings file would be created in
wp-content/plugins/cache-enabler/settings
. This would lead to the Cache Enabler settings not working when the cache is handled by the advanced cache.Solution would be using
get_home_url()
, which gets the Site Address (URL) setting, instead ofget_site_url()
, which gets the WordPress Address (URL) setting. The Site Address (URL) setting is where the front end is accessible and will determine the cache structure.WordPress topic: https://wordpress.org/support/topic/updating-a-post-does-not-clear-homepage-cache/