[wp-trac] [WordPress Trac] #21879: wp_count_posts() cache is not destroyed after post inserts and deletions

WordPress Trac noreply at wordpress.org
Mon Feb 3 19:41:41 UTC 2014


#21879: wp_count_posts() cache is not destroyed after post inserts and deletions
------------------------------+-----------------------------
 Reporter:  mark8barnes       |       Owner:  wonderboymusic
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  3.9
Component:  Cache API         |     Version:  3.4.2
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+-----------------------------
Changes (by wonderboymusic):

 * owner:   => wonderboymusic
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"27081"]:
 {{{
 #!CommitTicketReference repository="" revision="27081"
 Properly invalidate the cache for `wp_count_posts()` on insert, trash, or
 when transitioning `post_status` inside of `_transition_post_status()`.
 Introduces `_count_posts_cache_key()`. Adds unit tests.

 Props mark8barnes, for bringing this to our attention in an initial patch.
 Fixes #21879.
 }}}

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


More information about the wp-trac mailing list