- Timestamp:
- 09/01/2016 03:27:12 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/classes/class-bp-activity-activity.php
r10908 r11054 646 646 $activity_ids_sql = apply_filters( 'bp_activity_paged_activities_sql', $activity_ids_sql, $r ); 647 647 648 $activity_ids = $wpdb->get_col( $activity_ids_sql ); 648 $cached = bp_core_get_incremented_cache( $activity_ids_sql, 'bp_activity' ); 649 if ( false === $cached ) { 650 $activity_ids = $wpdb->get_col( $activity_ids_sql ); 651 bp_core_set_incremented_cache( $activity_ids_sql, 'bp_activity', $activity_ids ); 652 } else { 653 $activity_ids = $cached; 654 } 649 655 650 656 $retval['has_more_items'] = ! empty( $per_page ) && count( $activity_ids ) > $per_page; … … 703 709 */ 704 710 $total_activities_sql = apply_filters( 'bp_activity_total_activities_sql', "SELECT count(DISTINCT a.id) FROM {$bp->activity->table_name} a {$join_sql} {$where_sql}", $where_sql, $sort ); 705 $total_activities = $wpdb->get_var( $total_activities_sql ); 711 $cached = bp_core_get_incremented_cache( $total_activities_sql, 'bp_activity' ); 712 if ( false === $cached ) { 713 $total_activities = $wpdb->get_var( $total_activities_sql ); 714 bp_core_set_incremented_cache( $total_activities_sql, 'bp_activity', $total_activities ); 715 } else { 716 $total_activities = $cached; 717 } 706 718 707 719 if ( !empty( $r['max'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.