2586 | | $comments = (array) $wpdb->get_results( "SELECT $distinct {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits" ); |
| 2586 | $comments_request = "SELECT $distinct {$wpdb->comments}.comment_ID FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits"; |
| 2587 | $key = md5( $comments_request ); |
| 2588 | $last_changed = wp_cache_get_last_changed( 'comment' ); |
| 2589 | $last_changed_posts = wp_cache_get_last_changed( 'posts' ); |
| 2590 | $cache_key = "comment_feed:$key:$last_changed:$last_changed_posts"; |
| 2591 | $comment_ids = wp_cache_get( $cache_key, 'comment' ); |
| 2592 | if ( false === $comment_ids ) { |
| 2593 | $comment_ids = $wpdb->get_col( $comments_request ); |
| 2594 | wp_cache_add( $cache_key, (array) $comment_ids, 'comment' ); |
| 2595 | } |
| 2596 | _prime_comment_caches( $comment_ids, false ); |
2990 | | $comments_request = "SELECT {$wpdb->comments}.* FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits"; |
2991 | | $comments = $wpdb->get_results( $comments_request ); |
| 3000 | $comments_request = "SELECT {$wpdb->comments}.comment_ID FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits"; |
| 3001 | $key = md5( $comments_request ); |
| 3002 | $last_changed = wp_cache_get_last_changed( 'comment' ); |
| 3003 | $cache_key = "comment_feed:$key:$last_changed"; |
| 3004 | $comment_ids = wp_cache_get( $cache_key, 'comment' ); |
| 3005 | if ( false === $comment_ids ) { |
| 3006 | $comment_ids = $wpdb->get_col( $comments_request ); |
| 3007 | wp_cache_add( $cache_key, $comment_ids, 'comment' ); |
| 3008 | } |
| 3009 | _prime_comment_caches( $comment_ids, false ); |