Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

#5435 closed enhancement (fixed)

Improvements to object caching in bp-friends

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: 2.0 Priority: normal
Severity: normal Version:
Component: Friends Keywords:
Cc:

Description

The friends component uses object caching in some places, but it's incomplete and in some cases appears to be incorrect.

This is a general ticket for commits that address this issue for the 2.0 cycle.

Related: #5407, #5434.

Change History (5)

#1 @r-a-y
11 years ago

In 7999:

Don't query friendship status in BP_User_Query for logged-out users.

The bp_friends_filter_user_query_populate_extras() function is used to
add the confirmed friendship status against the logged-in user to the
existing user query.

However, we don't need to run this query if a user isn't logged in.

See #5435.

#2 @r-a-y
11 years ago

In 8103:

Friends: Add cache file to component loader.

This file was never included during the BP component API refactor
from r3917.

See #5435.

#3 @johnjamesjacoby
11 years ago

Nice catch.

#4 @r-a-y
11 years ago

In 8105:

Cache the friendship request user IDs for a given user.

This commit:

  • Caches calls to BP_Friends_Friendship::get_friendship_request_user_ids()
  • Invalidates the friend request cache when a friendship is saved or removed
  • Adds unit tests

See #5435, #5414

#5 @r-a-y
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Closing for 2.0. We can revisit further optimizations in subsequent releases.

Note: See TracTickets for help on using tickets.