[wpmu-trac] Re: [WordPress MU Trac] #557: Object Cache Not Updating

WordPress MU Trac wpmu-trac at lists.automattic.com
Mon Mar 10 05:07:01 GMT 2008


#557: Object Cache Not Updating
----------------------------------------+-----------------------------------
 Reporter:  lunabyte                    |        Owner:  donncha 
     Type:  defect                      |       Status:  assigned
 Priority:  highest                     |    Milestone:  WPMU 1.0
Component:  component1                  |      Version:  1.0     
 Severity:  blocker                     |   Resolution:          
 Keywords:  1.3.2, 1.3.3, object cache  |  
----------------------------------------+-----------------------------------
Comment (by jamescollins):

 Replying to [comment:8 lukacu]:
 > I can confirm the problem in MU 1.3.3 when the user edits a page with
 attachments.

 I can also confirm this problem with MU 1.3.3, and editing a post that has
 a link to an attachment (<a> contains rel="attachment).

 The problem only occurs after adding an attachment and inserting it using
 the
 "link to" page option. This adds code such as:
 <a href="attachmenturl"
 rel="attachment wp-att-3" title="deckplans.swf">deckplans.swf</a>

 This rel="attachment" causes the _fix_attachment_links() function to be
 called,
 after the page is saved, however this function uses an (out of date)
 cached
 version of the page. The function then saves the old page content back
 into the
 database.

 My debugging has shown that wp_update_post() saves the post's new content
 correctly to the database.

 This function then attempts to clear the page cache (calling
 wp_cache_delete()), which tries to remove
 $wp_object_cache->cache[20-pages-9], however there is nothing in the cache
 with that key.

 The cache actually contains $wp_object_cache->cache[20-20-pages-9]
 instead. So somehow the page cache is being stored with the page id in
 there twice, whereas the cache deletion routine tries to delete the cache
 with key 20-pages-9.

 Then _fix_attachment_links() gets called, which uses the (out of date)
 cached version of the page, which then saves the previous page's content
 back into the database.

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/557#comment:10>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list