[wpmu-trac] [WordPress MU Trac] #542: WordPress on-disk cache broken

WordPress MU Trac wpmu-trac at lists.automattic.com
Sat Jan 12 03:19:26 GMT 2008


#542: WordPress on-disk cache broken
--------------------------+-------------------------------------------------
 Reporter:  dreamer12345  |       Owner:  somebody
     Type:  defect        |      Status:  new     
 Priority:  high          |   Milestone:  WPMU 1.0
Component:  component1    |     Version:          
 Severity:  normal        |    Keywords:          
--------------------------+-------------------------------------------------
 Hello,

 I discovered a bug with the on-disk cache in WordPress MU 1.3: it is
 broken and will work in no (or nearly no) situations.
 This is because the filename generation of a cached file of the method
 which loads the cache file is different from the one of the method which
 saves this cache file.

 The filename of the WP_Object_Cache::get method is made with a hash of the
 ID of the cache entry (wp-includes/cache.php, line 171) while the filename
 of the WP_Object_Cache::save method is made with a hash of the group AND
 the ID of the cache entry (wp-includes/cache.php, line 341).

 One of the possible bug fix -> on line 171, replace:
 {{{$cache_file =
 $this->cache_dir.$this->get_group_dir($group_key)."/".$this->hash($id).'.php';}}}
 by:
 {{{$cache_file =
 $this->cache_dir.$this->get_group_dir($group_key)."/".$this->hash($hash).'.php';}}}

 Thank you for your attention :-)

 Frédéric.

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/542>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list