diff --git src/bp-core/classes/class-bp-core.php src/bp-core/classes/class-bp-core.php
index 9ecf8ab8d..9128428d7 100644
|
|
class BP_Core extends BP_Component { |
311 | 311 | |
312 | 312 | // Global groups. |
313 | 313 | wp_cache_add_global_groups( array( |
314 | | 'bp' |
| 314 | 'bp', |
| 315 | 'bp_pages', |
| 316 | 'bp_invitations', |
315 | 317 | ) ); |
316 | 318 | |
317 | 319 | parent::setup_cache_groups(); |
diff --git src/bp-friends/bp-friends-template.php src/bp-friends/bp-friends-template.php
index 2f146a8c9..e138ae08d 100644
|
|
function bp_friend_friendship_id() { |
569 | 569 | function bp_get_friend_friendship_id() { |
570 | 570 | global $members_template; |
571 | 571 | |
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' ) ) { |
573 | 573 | $friendship_id = friends_get_friendship_id( $members_template->member->id, bp_loggedin_user_id() ); |
574 | 574 | wp_cache_set( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id(), $friendship_id, 'bp' ); |
575 | 575 | } |
… |
… |
function bp_friend_accept_request_link() { |
604 | 604 | function bp_get_friend_accept_request_link() { |
605 | 605 | global $members_template; |
606 | 606 | |
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' ) ) { |
608 | 608 | $friendship_id = friends_get_friendship_id( $members_template->member->id, bp_loggedin_user_id() ); |
609 | 609 | wp_cache_set( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id(), $friendship_id, 'bp' ); |
610 | 610 | } |
… |
… |
function bp_friend_reject_request_link() { |
641 | 641 | function bp_get_friend_reject_request_link() { |
642 | 642 | global $members_template; |
643 | 643 | |
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' ) ) { |
645 | 645 | $friendship_id = friends_get_friendship_id( $members_template->member->id, bp_loggedin_user_id() ); |
646 | 646 | wp_cache_set( 'friendship_id_' . $members_template->member->id . '_' . bp_loggedin_user_id(), $friendship_id, 'bp' ); |
647 | 647 | } |
diff --git src/bp-groups/classes/class-bp-groups-component.php src/bp-groups/classes/class-bp-groups-component.php
index 28b7d6ff2..b05c94d8c 100644
|
|
class BP_Groups_Component extends BP_Component { |
962 | 962 | public function setup_cache_groups() { |
963 | 963 | |
964 | 964 | // 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 | ); |
973 | 978 | |
974 | 979 | parent::setup_cache_groups(); |
975 | 980 | } |
diff --git src/bp-members/classes/class-bp-members-component.php src/bp-members/classes/class-bp-members-component.php
index 3a70e2e45..dc18fe897 100644
|
|
class BP_Members_Component extends BP_Component { |
724 | 724 | // Global groups. |
725 | 725 | wp_cache_add_global_groups( array( |
726 | 726 | 'bp_last_activity', |
727 | | 'bp_member_type' |
| 727 | 'bp_member_member_type', |
728 | 728 | ) ); |
729 | 729 | |
730 | 730 | parent::setup_cache_groups(); |
diff --git src/bp-notifications/classes/class-bp-notifications-component.php src/bp-notifications/classes/class-bp-notifications-component.php
index e9f50127a..2cb14d4ad 100644
|
|
class BP_Notifications_Component extends BP_Component { |
311 | 311 | // Global groups. |
312 | 312 | wp_cache_add_global_groups( array( |
313 | 313 | 'bp_notifications', |
314 | | 'notification_meta' |
| 314 | 'notification_meta', |
| 315 | 'bp_notifications_unread_count', |
| 316 | 'bp_notifications_grouped_notifications', |
315 | 317 | ) ); |
316 | 318 | |
317 | 319 | parent::setup_cache_groups(); |
diff --git tests/phpunit/testcases/members/types.php tests/phpunit/testcases/members/types.php
index a008e8c40..7c1e6db00 100644
|
|
class BP_Tests_Members_Types extends BP_UnitTestCase { |
266 | 266 | wp_delete_user( $u ); |
267 | 267 | } |
268 | 268 | |
269 | | $this->assertFalse( wp_cache_get( $u, 'bp_member_type' ) ); |
| 269 | $this->assertFalse( wp_cache_get( $u, 'bp_member_member_type' ) ); |
270 | 270 | $this->assertFalse( bp_get_member_type( $u ) ); |
271 | 271 | } |
272 | 272 | |