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

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 18 07:33:50 UTC 2009


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

  * keywords:  reporter-feedback needs-unit-tests => needs-unit-tests


Comment:

 My reasoning when I initially opened the ticket was... I wanted to use the
 ancestors field to avoid DB calls. I then noticed it wasn't always set.
 It's not much of a big deal in practice, except that the object cache ends
 up with crummy data.

 What the patch does is, it verifies that the ancestors are set and fixes
 the object cache in the event they aren't.

 I ended up deciding to query the DB anyway and use a special cache bucket
 for ancestors, since the WP API was too unreliable on this front. Just
 close as wontfix if you think we can live with that.

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


More information about the wp-trac mailing list