[wp-trac] [WordPress Trac] #11409: wp_count_comments() should be cached in a transient.

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 27 21:35:13 UTC 2010


#11409: wp_count_comments() should be cached in a transient.
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  ryan       
     Type:  enhancement        |      Status:  new        
 Priority:  normal             |   Milestone:  3.0        
Component:  Optimization       |     Version:             
 Severity:  normal             |    Keywords:  needs-patch
-------------------------------+--------------------------------------------

Comment(by nacin):

 Replying to [comment:8 chrisscott]:
 > Replying to [comment:7 nacin]:
 > > We'd also need to update/clear the transient whenever the number of
 pending comments changes.
 > This is a little more complex than just pending comment change since the
 object stored in the transient has counts for total_comments, approved,
 moderated, spam, trash and post-trash statuses. Not sure how to proceed
 w/this.

 We can bust the transient during a comment status change.

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


More information about the wp-trac mailing list