[wp-trac] [WordPress Trac] #58962: Provide a way to load multiple specific options with a single database request
WordPress Trac
noreply at wordpress.org
Wed Oct 25 21:54:12 UTC 2023
#58962: Provide a way to load multiple specific options with a single database
request
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: flixos90
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.4
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests has-dev- | Focuses:
note dev-reviewed | performance
-------------------------------------------------+-------------------------
Comment (by peterwilsoncc):
Replying to [comment:48 flixos90]:
> 1. Should we prefix the functions with an underscore?
> 2. Should we use the term "prime" or the term "load"?
1. You've convinced me, it's probably best ''not'' to follow the
convention and prefix with `wp_`.
2. I remain convinced prime is the best term. Both because of how the
functions differ from existing `wp_load` functions and, as Jon mentions
above, priming a cache is an established industry phrase. I'm guessing
that's why the original function names used the word prime.
My linked [https://github.com/WordPress/wordpress-develop/pull/5548 pull
request #5548] follows these steps and uses the names
`wp_prime_options_cache()` and `wp_prime_options_cache_by_group()`. A
modified version of @joemcgill's option two to address @flixos90's
concerns about continuing with an underscore convention.
I'd like to adopt these in 6.4 and continue the original discussion from
#56386 about either deprecating or aliasing the existing functions in a
follow up ticket. Joe's option three.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58962#comment:49>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list