[wp-trac] [WordPress Trac] #58962: Provide a way to load multiple specific options with a single database request
WordPress Trac
noreply at wordpress.org
Tue Oct 24 14:33:38 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 flixos90):
Following up on @hellofromTonya's questions above:
* The two new functions are being introduced purely for external (plugin
or theme, most likely plugin) developers to load their options in bulk
before accessing them, to improve performance over having to load them
individually only once they're accessed.
* One may also argue that these functions are priming the caches for these
options, though this is of secondary importance, and really not important
(as in, a low level detail) to know for the developer using the function.
* All they need to know is: Call this function early during the request,
with the options from your plugin that you're going to access throughout
the request, in order to improve performance.
Given that this has been `dev-reviewed` by another committer, and in order
to prevent inconsistent `trunk` and `6.4` branches, I will move forward
with the backport, and update the dev note accordingly. I think we have
exhausted the conversation here and everybody involved shared their
perspectives, and they were considered. If there remains any strong
objections against the current names that I may have missed, we can always
reopen again.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58962#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list