[wp-trac] [WordPress Trac] #11399: clean_post_cache() generates enormous amounts of queries on sites with lots of pages, revisions or attachments

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 16 17:44:14 UTC 2012


#11399: clean_post_cache() generates enormous amounts of queries on sites with lots
of pages, revisions or attachments
---------------------------------------------------+------------------
 Reporter:  Denis-de-Bernardy                      |       Owner:
     Type:  defect (bug)                           |      Status:  new
 Priority:  normal                                 |   Milestone:  3.5
Component:  Optimization                           |     Version:  2.9
 Severity:  normal                                 |  Resolution:
 Keywords:  dev-feedback has-patch needs-feedback  |
---------------------------------------------------+------------------
Changes (by nacin):

 * milestone:  Future Release => 3.5


Comment:

 We also double-up with _save_post_hook(). We call clean_post_cache() in
 wp_insert_post() but again on the 'save_post' hook.

 'save_post' is also fired in wp_publish_post(). But is there any reason
 why wp_publish_post() doesn't just wrap wp_insert_post()? I didn't think
 so either.

 Let's keep calling clear_post_cache() directly in wp_insert_post(),
 truncate wp_publish_post(), and remove _save_post_hook(). I can't imagine
 we actually need them in both places; earlier is probably better.

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


More information about the wp-trac mailing list