[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 19:20:47 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 desrosj):

 Having read through this, I wanted to give some outside thoughts and
 opinions on the discussion so far in order to try and move us forward with
 the short amount of time available.

 While I do generally agree we should make things as easy to understand as
 we can for developers/extenders/etc., I disagree with hiding technical
 terms to accomplish that. Avoiding potentially transitional jargon is one
 thing, but avoiding adopted and established nomenclature of things is
 another. Whenever clarification is required, we can better communicate
 purpose and context through expanded inline documentation.

 There were a few mentions above that "prime" was only meant to be an
 internal term. I do also disagree with that. In the context of caching,
 prime has specific meaning and is widely used throughout the industry in
 association with caching. It may be that it wasn't intended to expose the
 term to the broader developer community, but we shouldn't shy away from it
 if it's the right term to use.

 > - wp_load_alloptions() does not accept arguments regarding which options
 should be cached
 > - wp_load_core_site_options() does not accept arguments regarding which
 options should be cached
 > - _prime_thing_cache(), like these new functions, accepts an array of
 arguments to define which items should be cached.

 As for the issue of which naming convention to use for 6.4, I see the pros
 and cons of both sides and personally don't have a strongly held opinion.
 But I definitely prefer using `prime` for the bullet points mentioned
 above.

 And finally how to move forward, I also prefer option 2 mentioned above.
 While we intend to follow up in 6.5 to rename things more holistically,
 it's always possible that it could take 2, 3 or more releases to
 accomplish this (we all know what it's like to find new unknown problems
 when attempting something). So for the time being, I think it makes sense
 to have everything named similarly. Even if with an older naming
 convention.

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


More information about the wp-trac mailing list