WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 4 months ago

#40028 closed defect (bug) (fixed)

Network/Site cache cleaning does not obey cache invalidation suspension

Reported by: johnjamesjacoby Owned by: jeremyfelt
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-patch has-unit-tests commit
Focuses: multisite Cc:

Description

Sites & Networks do not obey the $_wp_suspend_cache_invalidation global when their clean functions are called.

This can result in an excessive number of cache invalidations when this global value is explicitly set.

Attachments (2)

40028.diff (1.5 KB) - added by johnjamesjacoby 5 months ago.
Check $_wp_suspend_cache_invalidation (and also some related whitespace & order clean-up in clean_blog_cache())
40028.2.diff (2.9 KB) - added by jeremyfelt 4 months ago.

Download all attachments as: .zip

Change History (5)

@johnjamesjacoby
5 months ago

Check $_wp_suspend_cache_invalidation (and also some related whitespace & order clean-up in clean_blog_cache())

@jeremyfelt
4 months ago

#1 @jeremyfelt
4 months ago

  • Keywords has-unit-tests added
  • Milestone changed from Awaiting Review to 4.8
  • Owner set to jeremyfelt
  • Status changed from new to assigned

This makes sense and 40028.diff looks good, thanks @johnjamesjacoby. I added tests for the sites cache in 40028.2.diff.

#2 @johnjamesjacoby
4 months ago

  • Keywords commit added

👍 thanks @jeremyfelt

#3 @jeremyfelt
4 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 40346:

Multisite: Respect $_wp_suspend_cache_invalidation when clearing network and site caches.

Props johnjamesjacoby.
Fixes #40028.

Note: See TracTickets for help on using tickets.