[wp-trac] [WordPress Trac] #15400: Recent comments widget triggers query for each post not in cache

WordPress Trac wp-trac at lists.automattic.com
Tue Dec 14 14:31:23 UTC 2010


#15400: Recent comments widget triggers query for each post not in cache
-------------------------+--------------------------------------------------
 Reporter:  nacin        |       Owner:                           
     Type:  enhancement  |      Status:  new                      
 Priority:  normal       |   Milestone:  Future Release           
Component:  Cache        |     Version:                           
 Severity:  normal       |    Keywords:  needs-patch 3.2-early gci
-------------------------+--------------------------------------------------

Comment(by westi):

 I've reviewed your patch and have the following comments.

    1. You shouldn't directly access/delete cache objects from within the
 widget code
    2. It would be better to do two queries one to fetch the comments and
 one with get_posts to fetch and cache the posts.

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


More information about the wp-trac mailing list