[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 00:49:40 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 joemcgill):

 @peterwilsoncc I'm really sorry that the double sign-off on this didn't
 allow you the opportunity to follow up. To add some additional context, I
 think the rush was mostly due to the pending deadline for the RC2 package
 that was released earlier today. Speaking personally, I tend to think of
 the spirit of double sign off as mostly a precaution against introducing
 late bugs, rather than a way of expressing that an ongoing discussion
 should be ended. Even so, I'll try to be more cautious about that in the
 future.

 Since you raised the question about appropriate naming again, I went back
 to research the ticket where all of the existing priming functions were
 made public, #56386, and admit that I wasn't aware of the whole discussion
 that happened then. It does seem like similar concerns about the use of
 underscores in intentionally public functions was raised in that ticket as
 well and both @desrosj and @SergeyBiryukov agreed that there wasn't a
 strong need to rename these functions at that time. Perhaps we should
 reconsider the naming strategy in a future release? In the meantime, I
 think it would be good to avoid as much churn as possible with the new
 function names.

 These new functions do seem to have the same functional purpose as
 existing `_prime_{thing}_cache` functions, as I mentioned [comment:18 in a
 previous comment]. Assuming we can come to agreement on that point, it
 seems to me like we have 3 options:

 1. Leave things as they currently stand and punt the naming conversation
 to a future release.
 2. Update these new function names to `_prime_options_cache()` and
 `_prime_options_cache_by_group()`, to be consistent with other cache
 priming functions in the meantime.
 3. Update the new function names to what we anticipate potentially
 renaming the other functions.

 Given that all of us have been pretty close to this conversation, I think
 it would be useful to get some outside opinions, if possible.

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


More information about the wp-trac mailing list