Make WordPress Core

Ticket #4743: bookmark.php.diff

File bookmark.php.diff, 815 bytes (added by josephscott, 17 years ago)
  • bookmark.php

     
    3737        $r = wp_parse_args( $args, $defaults );
    3838        extract( $r, EXTR_SKIP );
    3939
     40        $cache_category = 'get_bookmarks_' . $category;
     41
    4042        $key = md5( serialize( $r ) );
    41         if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) )
     43        if ( $cache = wp_cache_get( $cache_category, 'bookmark' ) )
    4244                if ( isset( $cache[ $key ] ) )
    4345                        return apply_filters('get_bookmarks', $cache[ $key ], $r );
    4446
     
    137139        $results = $wpdb->get_results($query);
    138140
    139141        $cache[ $key ] = $results;
    140         wp_cache_add( 'get_bookmarks', $cache, 'bookmark' );
     142        wp_cache_add( $cache_category, $cache, 'bookmark' );
    141143
    142144        return apply_filters('get_bookmarks', $results, $r);
    143145}