[wp-trac] [WordPress Trac] #10615: Recent Comments Widget Should Use Comments API

WordPress Trac wp-trac at lists.automattic.com
Sun Aug 16 03:50:55 UTC 2009


#10615: Recent Comments Widget Should Use Comments API
--------------------------+-------------------------------------------------
 Reporter:  filosofo      |       Owner:                                                  
     Type:  defect (bug)  |      Status:  new                                             
 Priority:  normal        |   Milestone:  2.9                                             
Component:  Comments      |     Version:  2.9                                             
 Severity:  normal        |    Keywords:  get_comments WP_Widget_Recent_Comments has-patch
--------------------------+-------------------------------------------------

Comment(by filosofo):

 Replying to [comment:4 azaozz]:
 > Why remove the explicit caching? That will force blogs with persistent
 cache to run the rest of the code on almost every page load.

 Ok, taking that into account, third patch does what the recent posts
 widget cache does: it uses the query API but caches the ''printed
 output''.

 Improvements:
  * Still using API instead of direct db calls
  * Likely to have to query less in most cases, as default 5 queried
 comments is less than previous 15 comments no matter what.
  * Persistent cache of output instead of serialized comment objects means
 we're caching a smaller amount of data but interrupting sooner, thereby
 reducing processing and memory use.

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


More information about the wp-trac mailing list