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:
Peter Wilson 2022-04-06 04:35:00 +00:00
parent da07ae873e
commit d7d9102b06
3 changed files with 8 additions and 14 deletions

View File

@ -1173,8 +1173,6 @@ function populate_network_meta( $network_id, array $meta = array() ) {
wp_cache_delete( $network_id, 'networks' );
}
wp_cache_delete( 'networks_have_paths', 'site-options' );
if ( ! is_multisite() ) {
$site_admins = array( $site_user->user_login );
$users = get_users(

View File

@ -353,8 +353,6 @@ class WP_Network {
*/
$using_paths = true;
if ( wp_using_ext_object_cache() ) {
$using_paths = wp_cache_get( 'networks_have_paths', 'site-options' );
if ( false === $using_paths ) {
$using_paths = get_networks(
array(
'number' => 1,
@ -362,8 +360,6 @@ class WP_Network {
'path__not_in' => '/',
)
);
wp_cache_add( 'networks_have_paths', $using_paths, 'site-options' );
}
}
$paths = array();

View File

@ -16,7 +16,7 @@
*
* @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.