Networks and Sites: Remove duplicate cache entry.
Remove the `networks_have_paths, site-options` cache entry as it duplicates caching within the `WP_Network_Query` class. Props uday17035, spacedmonkey, johnbillion, johnjamesjacoby. Fixes #42070. Built from https://develop.svn.wordpress.org/trunk@53083 git-svn-id: http://core.svn.wordpress.org/trunk@52672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
da07ae873e
commit
d7d9102b06
|
@ -1173,8 +1173,6 @@ function populate_network_meta( $network_id, array $meta = array() ) {
|
||||||
wp_cache_delete( $network_id, 'networks' );
|
wp_cache_delete( $network_id, 'networks' );
|
||||||
}
|
}
|
||||||
|
|
||||||
wp_cache_delete( 'networks_have_paths', 'site-options' );
|
|
||||||
|
|
||||||
if ( ! is_multisite() ) {
|
if ( ! is_multisite() ) {
|
||||||
$site_admins = array( $site_user->user_login );
|
$site_admins = array( $site_user->user_login );
|
||||||
$users = get_users(
|
$users = get_users(
|
||||||
|
|
|
@ -353,8 +353,6 @@ class WP_Network {
|
||||||
*/
|
*/
|
||||||
$using_paths = true;
|
$using_paths = true;
|
||||||
if ( wp_using_ext_object_cache() ) {
|
if ( wp_using_ext_object_cache() ) {
|
||||||
$using_paths = wp_cache_get( 'networks_have_paths', 'site-options' );
|
|
||||||
if ( false === $using_paths ) {
|
|
||||||
$using_paths = get_networks(
|
$using_paths = get_networks(
|
||||||
array(
|
array(
|
||||||
'number' => 1,
|
'number' => 1,
|
||||||
|
@ -362,8 +360,6 @@ class WP_Network {
|
||||||
'path__not_in' => '/',
|
'path__not_in' => '/',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
wp_cache_add( 'networks_have_paths', $using_paths, 'site-options' );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$paths = array();
|
$paths = array();
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.0-alpha-53082';
|
$wp_version = '6.0-alpha-53083';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue