[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:07:33 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 chrisscott):

 Replying to [comment:7 nacin]:
 > We'd also need to update/clear the transient whenever the number of
 pending comments changes.

 Sorry, I thought about that and then forgot just as quickly...

 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.

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


More information about the wp-trac mailing list