[wp-trac] [WordPress Trac] #63618: `is_object_in_term` object cache uses "set" instead of "add"

WordPress Trac noreply at wordpress.org
Mon Jun 23 19:54:03 UTC 2025


#63618: `is_object_in_term` object cache uses "set" instead of "add"
--------------------------+------------------------------
 Reporter:  nlemoine      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Cache API     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by nlemoine):

 Additional note: term relationships caching is used in multiple functions:
 -
 https://github.com/WordPress/WordPress/blob/c6041fd40a9d499a5d602be791349068699ef695
 /wp-admin/includes/template.php#L357-L361
 -
 https://github.com/WordPress/WordPress/blob/c6041fd40a9d499a5d602be791349068699ef695
 /wp-includes/category-template.php#L1298-L1302
 -
 https://github.com/WordPress/WordPress/blob/c6041fd40a9d499a5d602be791349068699ef695
 /wp-admin/includes/taxonomy.php#L266-L270
 -
 https://github.com/WordPress/WordPress/blob/c6041fd40a9d499a5d602be791349068699ef695
 /wp-includes/taxonomy.php#L4890-L4895

 The same code pattern is reused in multiple locations. It may need a
 central place for handling terms caching.

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


More information about the wp-trac mailing list