[wp-trac] [WordPress Trac] #57163: Don't use _prime_post_caches() if meta/terms cache should be updated

WordPress Trac noreply at wordpress.org
Mon Nov 21 22:07:14 UTC 2022


#57163: Don't use _prime_post_caches() if meta/terms cache should be updated
--------------------------+--------------------------
 Reporter:  ocean90       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.1.2
Component:  Query         |     Version:  6.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  performance
--------------------------+--------------------------

Comment (by peterwilsoncc):

 I think this is a bug with `_prime_post_caches()`.

 For post meta, a separate check can be done for `_get_non_cached_ids(
 $ids, 'post_meta' );`.

 Post terms would be more complicated as the group name differs for each
 taxonomy: `"{$taxonomy}_relationships"`. `update_object_term_cache()`
 already handles this so if the function is called to warm caches, then it
 might be possible to call without wrapping it in a `_get_non_cached_ids()`
 check.

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


More information about the wp-trac mailing list