Ticket #4743: bookmark.php.diff
File bookmark.php.diff, 815 bytes (added by , 17 years ago) |
---|
-
bookmark.php
37 37 $r = wp_parse_args( $args, $defaults ); 38 38 extract( $r, EXTR_SKIP ); 39 39 40 $cache_category = 'get_bookmarks_' . $category; 41 40 42 $key = md5( serialize( $r ) ); 41 if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) )43 if ( $cache = wp_cache_get( $cache_category, 'bookmark' ) ) 42 44 if ( isset( $cache[ $key ] ) ) 43 45 return apply_filters('get_bookmarks', $cache[ $key ], $r ); 44 46 … … 137 139 $results = $wpdb->get_results($query); 138 140 139 141 $cache[ $key ] = $results; 140 wp_cache_add( 'get_bookmarks', $cache, 'bookmark' );142 wp_cache_add( $cache_category, $cache, 'bookmark' ); 141 143 142 144 return apply_filters('get_bookmarks', $results, $r); 143 145 }