Skip to content

Prime network options in a single cache call using wp_cache_get_multiple#3528

Closed
spacedmonkey wants to merge 13 commits intoWordPress:trunkfrom
spacedmonkey:fix/prime-network-options
Closed

Prime network options in a single cache call using wp_cache_get_multiple#3528
spacedmonkey wants to merge 13 commits intoWordPress:trunkfrom
spacedmonkey:fix/prime-network-options

Conversation

@spacedmonkey
Copy link
Member

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


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@JJJ
Copy link
Contributor

JJJ commented Oct 26, 2022

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

@spacedmonkey
Copy link
Member Author

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
Copy link
Member Author

@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.

@spacedmonkey spacedmonkey requested a review from joemcgill March 6, 2023 14:07
Copy link
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @spacedmonkey for the changes. Look good to me.

Do we need to update description for the function as now we use cache?

Loads and caches certain often requested site options if is_multisite() and a persistent cache is not being used.

@spacedmonkey spacedmonkey changed the title Prime network options in a single database query. Prime network options in a single cache call Jun 22, 2023
@spacedmonkey spacedmonkey changed the title Prime network options in a single cache call Prime network options in a single cache call using wp_cache_get_multiple Jun 22, 2023
@spacedmonkey spacedmonkey requested review from johnbillion and oglekler and removed request for oglekler June 22, 2023 14:54
@spacedmonkey
Copy link
Member Author

Committed efc70be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants