[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 18 22:06:14 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
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 > While I don't think we should use an underscore prefix for this function
 (since it's clearly not for core's private use), I would be open about
 renaming prime_options() to prime_option_caches().

 @flixos90 Re the underscore: I'm not sure what to do there now the cache
 priming functions have been made public. Go with consistency or try to
 move on from the errors of the past.

 I'll reopen this so the discussion is more visible and it can always be
 closed again if it's decided not to rename. For the functions I suggest:

 * `(_)prime_options_cache()`
 * `(_)prime_options_cache_by_group()`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58962#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list