Skip to content

Commit c421c7e

Browse files
committed
Cache API: Make network-queries and site-queries global cache groups.
Fixes a bug introduced in [55526]. The cache groups `network-queries` and `site-queries` store query results for network and site. These are network level data and should be stored in a global cache group. Props spacedmonkey, tillkruess, flixos90. See #57625. git-svn-id: https://develop.svn.wordpress.org/trunk@55537 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 82cd434 commit c421c7e

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/wp-includes/load.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,9 +759,11 @@ function wp_start_object_cache() {
759759
'blog_meta',
760760
'global-posts',
761761
'networks',
762+
'network-queries',
762763
'sites',
763764
'site-details',
764765
'site-options',
766+
'site-queries',
765767
'site-transient',
766768
'rss',
767769
'users',

src/wp-includes/ms-blogs.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,11 @@ function switch_to_blog( $new_blog_id, $deprecated = null ) {
560560
'blog_meta',
561561
'global-posts',
562562
'networks',
563+
'network-queries',
563564
'sites',
564565
'site-details',
565566
'site-options',
567+
'site-queries',
566568
'site-transient',
567569
'rss',
568570
'users',
@@ -651,9 +653,11 @@ function restore_current_blog() {
651653
'blog_meta',
652654
'global-posts',
653655
'networks',
656+
'network-queries',
654657
'sites',
655658
'site-details',
656659
'site-options',
660+
'site-queries',
657661
'site-transient',
658662
'rss',
659663
'users',

tests/phpunit/includes/abstract-testcase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,11 @@ public static function flush_cache() {
399399
'blog_meta',
400400
'global-posts',
401401
'networks',
402+
'network-queries',
402403
'sites',
403404
'site-details',
404405
'site-options',
406+
'site-queries',
405407
'site-transient',
406408
'rss',
407409
'users',

0 commit comments

Comments
 (0)