[wp-trac] [WordPress Trac] #58962: Provide a way to load multiple specific options with a single database request
WordPress Trac
noreply at wordpress.org
Thu Oct 19 18:01:44 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 | performance
-------------------------------------------------+-------------------------
Comment (by flixos90):
I'm onboard with the `prime_options_cache()` name (or
`prime_option_caches()`), but I strongly object to prefixing the function
with an underscore, which is a clear indicator of private functions, which
this function is not and was never intended to be.
The existing functions to prime caches started as private functions, and I
would argue even today they are primarily used by WordPress core. That is
different with the functions here which are primarily introduced for
plugins to make sure of them.
Prefixing a public function just for consistency sake with existing
private functions which ''may'' now be considered public is taking the
point of consistency too far IMO.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58962#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list