[wp-trac] [WordPress Trac] #10381: post->ancestors isn't always set

WordPress Trac wp-trac at lists.automattic.com
Sun Jun 13 01:09:10 UTC 2010


#10381: post->ancestors isn't always set
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  ryan                               
     Type:  defect (bug)       |      Status:  new                                
 Priority:  normal             |   Milestone:  3.1                                
Component:  Cache              |     Version:  2.8                                
 Severity:  normal             |    Keywords:  dev-feedback needs-unit-tests early
-------------------------------+--------------------------------------------

Comment(by shidouhikari):

 Let me suggest another solution.

 If post from parameter is object, it has its ancestors set. Cache is
 queried and if ancestors isn't set on it cache is deleted, to be added
 again just following.

 If post from parameter isn't object or is object and has filter set, get
 its ID. Cache is queried and if exists but again doesn't have ancestors
 set, update the object and set a new cache, without querying a whole
 object from database.

 If cache exists and has ancestors, nothing must be done.

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


More information about the wp-trac mailing list