Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#55462 closed enhancement (fixed)

Improve cache key generation in WP_Site_Query

Reported by: spacedmonkey's profile spacedmonkey Owned by: spacedmonkey's profile spacedmonkey
Milestone: 6.0 Priority: normal
Severity: normal Version: 4.6
Component: Networks and Sites Keywords: good-first-bug has-patch has-unit-tests commit
Focuses: multisite, performance Cc:

Description

Follow on from #55352.

Improve cache key generation in WP_Site_Query to improve likely that cache is reused. Unsetting update_site_cache and update_site_meta_cache, would improve cache keys, as this fields do not affect the cache.

Change History (8)

This ticket was mentioned in PR #2485 on WordPress/wordpress-develop by manuelRod.


3 years ago
#2

  • Keywords has-patch has-unit-tests added; needs-patch removed

Improve cache generation unsetting update_site_cache and update_site_meta_cache

Trac ticket: https://core.trac.wordpress.org/ticket/55462

#3 @furi3r
3 years ago

@spacedmonkey PR ready.

This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.


3 years ago

#5 @spacedmonkey
3 years ago

  • Milestone changed from Awaiting Review to 6.0
  • Owner set to spacedmonkey
  • Status changed from new to assigned

#6 @johnbillion
3 years ago

  • Keywords commit added

#7 @spacedmonkey
3 years ago

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

In 53097:

Networks and Sites: Improve cache key generation in WP_Site_Query class.

Improve cache key generation in the WP_Site_Query class by removing update_site_cache and update_site_meta_cache elements in the array used to generate
the cache key. These elements do not affect that cache and by removing them, improve the likelihood of reusing an existing cache.

Props Spacedmonkey, furi3r, johnbillion, johnjamesjacoby, flixos90.
Fixes #55462.

spacedmonkey commented on PR #2485:


3 years ago
#8

Committed.

Note: See TracTickets for help on using tickets.