Closed
Description
Hi!
It turns out that redis "purge all" feature won't work for installations where wordpress is installed in a separate folder:
/domain.com
-- /wp # it's where WP lives
-- wp-config.php
-- index.php
The reason is here:
https://github.com/rtCamp/nginx-helper/blob/master/redis-purger.php#L684
if( is_network_admin() ) {
delete_keys_by_wildcard( $prefix . '*' );
$this->log( '* Purged Everything! * ' );
} else { // Else purge only site specific cache
$parse = wp_parse_url( get_site_url() );
$parse['path'] = empty( $parse['path'] ) ? '/' : $parse['path'];
delete_keys_by_wildcard( $prefix . $parse['scheme'] . 'GET' . $parse['host'] . $parse['path'] . '*' );
$this->log( '* ' . get_site_url() . ' Purged! * ' );
}
Quickfix would be to use:
get_home_url
instead of get_site_url
I believe we should change that, since cache urls are constructed against WP_HOME
, not WP_SITEURL
or you can just change the query, so it would not contain parsed path
.
Metadata
Metadata
Assignees
Labels
No labels