[wp-trac] [WordPress Trac] #56386: Remove `@access private` from cache priming functions.

WordPress Trac noreply at wordpress.org
Mon Aug 15 22:20:04 UTC 2022


#56386: Remove `@access private` from cache priming functions.
---------------------------+----------------------------------------
 Reporter:  peterwilsoncc  |      Owner:  (none)
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Cache API      |    Version:
 Severity:  normal         |   Keywords:  good-first-bug needs-patch
  Focuses:  performance    |
---------------------------+----------------------------------------
 WordPress includes and makes heavy use of several functions for priming
 object caches. These functions reduce the number of database calls by
 querying the database for these objects in bulk.

 With the benefit of hindsight, I can't see why these functions are marked
 private. Furthermore, I think plugins should be actively encouraged to use
 them..

 I suggest the `@access private` delegation be removed from the following
 functions:

 * `_prime_post_caches()`
 * `_prime_term_caches()`
 * `_prime_comment_caches()`
 * `_prime_network_caches()`
 * `_prime_site_caches()`
 * `_get_non_cached_ids()`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56386>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list