[wp-trac] Re: [WordPress Trac] #6746: can't we cache _get_post_ancestors()?

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 16 16:17:20 GMT 2008


#6746: can't we cache _get_post_ancestors()?
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |        Owner:  anonymous
     Type:  defect             |       Status:  new      
 Priority:  normal             |    Milestone:           
Component:  Optimization       |      Version:  2.5      
 Severity:  normal             |   Resolution:           
 Keywords:                     |  
-------------------------------+--------------------------------------------
Comment (by Denis-de-Bernardy):

 further investigation leads me to identify get_permalink() as the likely
 culprit for the insane number of queries.

 brings me to a thought: isn't reasonable to assume that, if at one point
 another a page gets queried, there's a 99% change that get_permalink()
 will get called? if so, it would make sense to get all the ancestors and
 their details whenever they're not in the cache already.

 D.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6746#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list