Skip to:
Content

BuddyPress.org

Changeset 2618


Ignore:
Timestamp:
02/07/2010 03:39:34 PM (16 years ago)
Author:
apeatling
Message:

Adding missing cache_set() calls.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs.php

    r2617 r2618  
    608608                $blogs = BP_Blogs_Blog::get_all();
    609609                $count = $blogs['total'];
     610                wp_cache_set( 'bp_total_blogs', $count, 'bp' );
    610611        }
    611612        return $count;
     
    618619                $user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id : $bp->loggedin_user->id;
    619620
    620         if ( !$count = wp_cache_get( 'bp_total_blogs_for_user_' . $user_id, 'bp' ) )
     621        if ( !$count = wp_cache_get( 'bp_total_blogs_for_user_' . $user_id, 'bp' ) ) {
    621622                $count = BP_Blogs_Blog::total_blog_count_for_user( $user_id );
     623                wp_cache_set( 'bp_total_blogs_for_user_' . $user_id, $count, 'bp' );
     624        }
    622625
    623626        return $count;
  • trunk/bp-core.php

    r2617 r2618  
    10451045                $ud = bp_core_get_core_userdata($uid);
    10461046                $email = $ud->user_email;
    1047         }
    1048 
    1049         wp_cache_set( 'bp_user_email_' . $uid, $email, 'bp' );
     1047                wp_cache_set( 'bp_user_email_' . $uid, $email, 'bp' );
     1048        }
    10501049
    10511050        return apply_filters( 'bp_core_get_user_email', $email );
     
    12051204                $status_sql = bp_core_get_status_sql();
    12061205                $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM " . CUSTOM_USER_TABLE . " WHERE {$status_sql}" ) );
     1206                wp_cache_set( 'bp_total_member_count', $count, 'bp' );
    12071207        }
    12081208
  • trunk/bp-friends.php

    r2617 r2618  
    485485                $count = get_usermeta( $user_id, 'total_friend_count' );
    486486                if ( empty( $count ) ) $count = 0;
     487                wp_cache_set( 'bp_total_friend_count_' . $user_id, $count, 'bp' );
    487488        }
    488489
  • trunk/bp-groups.php

    r2617 r2618  
    17501750
    17511751function groups_get_total_group_count() {
    1752         if ( !$count = wp_cache_get( 'bp_total_group_count', 'bp' ) )
     1752        if ( !$count = wp_cache_get( 'bp_total_group_count', 'bp' ) ) {
    17531753                $count = BP_Groups_Group::get_total_group_count();
     1754                wp_cache_set( 'bp_total_group_count', $count, 'bp' );
     1755        }
    17541756
    17551757        return $count;
     
    17981800                $user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id : $bp->loggedin_user->id;
    17991801
    1800         if ( !$count = wp_cache_get( 'bp_total_groups_for_user_' . $user_id, 'bp' ) )
     1802        if ( !$count = wp_cache_get( 'bp_total_groups_for_user_' . $user_id, 'bp' ) ) {
    18011803                $count = BP_Groups_Member::total_group_count( $user_id );
     1804                wp_cache_set( 'bp_total_groups_for_user_' . $user_id, $count, 'bp' );
     1805        }
    18021806
    18031807        return $count;
Note: See TracChangeset for help on using the changeset viewer.