Skip to:
Content

BuddyPress.org

Changeset 13336


Ignore:
Timestamp:
10/06/2022 10:14:05 PM (20 months ago)
Author:
imath
Message:

Add missing global cache groups

Props nickchomey, dcavins

See #8590

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-core.php

    r13144 r13336  
    312312        // Global groups.
    313313        wp_cache_add_global_groups( array(
    314             'bp'
     314            'bp',
     315            'bp_pages',
     316            'bp_invitations',
    315317        ) );
    316318
  • trunk/src/bp-friends/bp-friends-template.php

    r13301 r13336  
    570570        global $members_template;
    571571
    572         if ( !$friendship_id = wp_cache_get( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id() ) ) {
     572        if ( ! $friendship_id = wp_cache_get( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id(), 'bp' ) ) {
    573573            $friendship_id = friends_get_friendship_id( $members_template->member->id, bp_loggedin_user_id() );
    574574            wp_cache_set( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id(), $friendship_id, 'bp' );
     
    605605        global $members_template;
    606606
    607         if ( !$friendship_id = wp_cache_get( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id() ) ) {
     607        if ( ! $friendship_id = wp_cache_get( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id(), 'bp' ) ) {
    608608            $friendship_id = friends_get_friendship_id( $members_template->member->id, bp_loggedin_user_id() );
    609609            wp_cache_set( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id(), $friendship_id, 'bp' );
     
    642642        global $members_template;
    643643
    644         if ( !$friendship_id = wp_cache_get( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id() ) ) {
     644        if ( ! $friendship_id = wp_cache_get( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id(), 'bp' ) ) {
    645645            $friendship_id = friends_get_friendship_id( $members_template->member->id, bp_loggedin_user_id() );
    646646            wp_cache_set( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id(), $friendship_id, 'bp' );
  • trunk/src/bp-groups/classes/class-bp-groups-component.php

    r13286 r13336  
    963963
    964964        // Global groups.
    965         wp_cache_add_global_groups( array(
    966             'bp_groups',
    967             'bp_group_admins',
    968             'bp_group_invite_count',
    969             'group_meta',
    970             'bp_groups_memberships',
    971             'bp_groups_memberships_for_user',
    972         ) );
     965        wp_cache_add_global_groups(
     966            array(
     967                'bp_groups',
     968                'bp_group_admins',
     969                'bp_group_invite_count',
     970                'group_meta',
     971                'bp_groups_memberships',
     972                'bp_groups_memberships_for_user',
     973                'bp_group_mods',
     974                'bp_groups_invitations_as_memberships',
     975                'bp_groups_group_type',
     976            )
     977        );
    973978
    974979        parent::setup_cache_groups();
  • trunk/src/bp-members/classes/class-bp-members-component.php

    r13185 r13336  
    725725        wp_cache_add_global_groups( array(
    726726            'bp_last_activity',
    727             'bp_member_type'
     727            'bp_member_member_type',
    728728        ) );
    729729
  • trunk/src/bp-notifications/classes/class-bp-notifications-component.php

    r13185 r13336  
    312312        wp_cache_add_global_groups( array(
    313313            'bp_notifications',
    314             'notification_meta'
     314            'notification_meta',
     315            'bp_notifications_unread_count',
     316            'bp_notifications_grouped_notifications',
    315317        ) );
    316318
  • trunk/tests/phpunit/testcases/members/types.php

    r13314 r13336  
    267267        }
    268268
    269         $this->assertFalse( wp_cache_get( $u, 'bp_member_type' ) );
     269        $this->assertFalse( wp_cache_get( $u, 'bp_member_member_type' ) );
    270270        $this->assertFalse( bp_get_member_type( $u ) );
    271271    }
Note: See TracChangeset for help on using the changeset viewer.