[wp-trac] [WordPress Trac] #12611: Performance hit from update_post_caches

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 30 13:11:49 UTC 2010


#12611: Performance hit from update_post_caches
--------------------------+-------------------------------------------------
 Reporter:  prettyboymp   |       Owner:  ryan        
     Type:  defect (bug)  |      Status:  assigned    
 Priority:  normal        |   Milestone:  3.0         
Component:  Performance   |     Version:              
 Severity:  normal        |    Keywords:  dev-feedback
--------------------------+-------------------------------------------------
Changes (by jeffstieler):

 * cc: jeff@… (added)


Comment:

 This can cause problems under the following conditions:

 If you use query_posts and filter the returned columns using the
 'posts_fields' filter, the resulting post objects will be cached, and
 could disrupt normal behavior in your theme.

 This caused an issue for me in a theme recently where I was only
 retrieving post IDs using query_posts, and then in the archive page loop
 posts' dates were missing and the permalinks were incorrect.

 This also had the side effect of an infinite redirect in the admin when
 trying to edit the affected posts.

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


More information about the wp-trac mailing list