Make WordPress Core

Opened 18 months ago

Closed 10 months ago

Last modified 9 months ago

#56913 closed enhancement (fixed)

Prime network options in a single cache call using wp_cache_get_multiple

Reported by: spacedmonkey's profile spacedmonkey Owned by: spacedmonkey's profile spacedmonkey
Milestone: 6.3 Priority: normal
Severity: normal Version: 3.0
Component: Options, Meta APIs Keywords: has-patch needs-testing commit
Focuses: performance Cc:

Description (last modified by spacedmonkey)

When wp_load_core_site_options change the logic to call wp_cache_get_multiple priming important network options in cache in a single cache call.

Change History (18)

This ticket was mentioned in PR #3528 on WordPress/wordpress-develop by @spacedmonkey.


18 months ago
#1

  • Keywords has-patch added

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


18 months ago

@johnjamesjacoby commented on PR #3528:


18 months ago
#3

Desperately want to pre-register these keys using register_meta() with some new autoload attribute 😬

@spacedmonkey commented on PR #3528:


18 months ago
#4

Desperately want to pre-register these keys using register_meta() with some new autoload attribute 😬

Where I personally agree, I feel like that is a larger discussion. This ticket is simple and easier to commit. If this get "fixed" by using the meta api down the line then so be it.

@spacedmonkey commented on PR #3528:


17 months ago
#5

@JJJ Question, how around using a autoload attribute work for multisite. This function is called early in the bootstrap. So would likely require register settings in a sunrise or advanced cache file. This feels weird and unlikely to happen.

#6 @spacedmonkey
14 months ago

  • Milestone changed from Future Release to 6.3

Would love a review of this as part of 6.3. Pinging @flixos90

#7 @spacedmonkey
14 months ago

  • Owner set to spacedmonkey
  • Status changed from new to assigned

#8 @mukesh27
13 months ago

  • Description modified (diff)

#9 @spacedmonkey
12 months ago

Now that [55146] is merged, fileupload_maxk, upload_space_check_disabled and upload_filetypes no longer needed to be automatically loaded.

This PR is now just to prime caches in object caches in a single call. There is less benefit, but it still useful. Worth committing @mukesh27 @johnjamesjacoby ?

#10 @oglekler
10 months ago

@spacedmonkey you have a failed Unit-test, could you please have a look and fix it. We are in 9 days until Beta 1 🤷

#11 @spacedmonkey
10 months ago

@oglekler Still awaiting review. Mind taking a look.

#12 @spacedmonkey
10 months ago

  • Description modified (diff)
  • Summary changed from Improve autoloaded network options to Prime network options in a single cache call using wp_cache_get_multiple

This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.


10 months ago

#14 @oglekler
10 months ago

  • Keywords needs-testing added

There is a discussion on the PR itself about improvements.

I tested this patch, it works, we have a time improvement with persistent cache. My suggestion is to commit this like it is now and continue discussion for further improvements separately.

Of course, other testers are welcome to test too.

#15 @spacedmonkey
10 months ago

  • Keywords commit added

I got enough approvals on the PR to commit. I think the discussion should continue as part of the beta process and we can revert if needed.

#16 @spacedmonkey
10 months ago

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

In 56061:

Options, Meta APIs: Prime network options in a single cache call using wp_cache_get_multiple.

Tweak the wp_load_core_site_options function, to also prime network options using wp_cache_get_multiple if persistent object cache is present.

Props mukesh27, oglekler, peterwilsoncc, costdev, jeremyfelt, spacedmonkey.
Fixes #56913.

Note: See TracTickets for help on using tickets.