mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@53083 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -353,17 +353,13 @@ 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,
|
||||
'count' => true,
|
||||
'path__not_in' => '/',
|
||||
)
|
||||
);
|
||||
wp_cache_add( 'networks_have_paths', $using_paths, 'site-options' );
|
||||
}
|
||||
$using_paths = get_networks(
|
||||
array(
|
||||
'number' => 1,
|
||||
'count' => true,
|
||||
'path__not_in' => '/',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$paths = array();
|
||||
|
||||
Reference in New Issue
Block a user