Ticket #18356: 18356.5.diff
File 18356.5.diff, 944 bytes (added by , 9 years ago) |
---|
-
src/wp-includes/bookmark.php
128 128 $r = wp_parse_args( $args, $defaults ); 129 129 130 130 $key = md5( serialize( $r ) ); 131 if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) ) {131 if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) && 'rand' !== $orderby ) { 132 132 if ( is_array( $cache ) && isset( $cache[ $key ] ) ) { 133 133 $bookmarks = $cache[ $key ]; 134 134 /** … … 285 285 286 286 $results = $wpdb->get_results( $query ); 287 287 288 $cache[ $key ] = $results; 289 wp_cache_set( 'get_bookmarks', $cache, 'bookmark' ); 288 if ( 'rand' !== $orderby ) { 289 $cache[ $key ] = $results; 290 wp_cache_set( 'get_bookmarks', $cache, 'bookmark' ); 291 } 290 292 291 293 /** This filter is documented in wp-includes/bookmark.php */ 292 294 return apply_filters( 'get_bookmarks', $results, $r );