[wp-trac] [WordPress Trac] #22560: Cache invalidation in wp_set_object_terms

WordPress Trac noreply at wordpress.org
Tue Nov 27 19:39:56 UTC 2012


#22560: Cache invalidation in wp_set_object_terms
-------------------------------------------+-----------------------
 Reporter:  batmoo                         |       Owner:  ryan
     Type:  defect (bug)                   |      Status:  assigned
 Priority:  normal                         |   Milestone:  3.5
Component:  Taxonomy                       |     Version:  trunk
 Severity:  normal                         |  Resolution:
 Keywords:  has-patch commit dev-reviewed  |
-------------------------------------------+-----------------------
Changes (by nacin):

 * keywords:  dev-feedback => has-patch commit dev-reviewed


Comment:

 If a taxonomy was assigned to completely different objects — say, a post
 and a user — and the same ID in both had a relationship cache, one would
 clear the other. This is acceptable, especially because that combination
 doesn't work anyway, as term relationships don't have a type of object —
 just an object ID and a tt ID.

 Also, there is one early return in wp_set_object_terms() for db errors. We
 weren't doing a cache delete in wp_set_post_terms() for WP_Error either,
 so this also seems good.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22560#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list