[wp-trac] [WordPress Trac] #11431: object cache's terms bucket potentially contains junk

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 14 17:14:50 UTC 2009


#11431: object cache's terms bucket potentially contains junk
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  ryan     
     Type:  enhancement        |      Status:  new      
 Priority:  normal             |   Milestone:  3.0      
Component:  Cache              |     Version:           
 Severity:  normal             |    Keywords:  has-patch
-------------------------------+--------------------------------------------

Comment(by Denis-de-Bernardy):

 there potentially is a better way to do this. such as is done in
 get_pages():

 {{{
         $key = md5( serialize( compact(array_keys($defaults)) ) );
         if ( $cache = wp_cache_get( 'get_pages', 'posts' ) ) {
                 if ( is_array($cache) && isset( $cache[ $key ] ) ) {
                         $pages = apply_filters('get_pages', $cache[ $key
 ], $r );
                         return $pages;
                 }
         }
 }}}

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


More information about the wp-trac mailing list