[buddypress-trac] [BuddyPress Trac] #6978: Friends: Add caching to BP_Friends_Friendship class

buddypress-trac noreply at wordpress.org
Sun Sep 11 23:20:17 UTC 2016

#6978: Friends: Add caching to BP_Friends_Friendship class
 Reporter:  r-a-y                   |       Owner:  dcavins
     Type:  enhancement             |      Status:  accepted
 Priority:  normal                  |   Milestone:  Future Release
Component:  Friends                 |     Version:  1.0
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |

Comment (by dcavins):

 I've updated this patch to do the following:
 • More closely maintain the behavior of `delete_all_for_user()` (and clear
 all of the related cache items).
 • Add a cache fetch in `BP_Friends_Friendship::populate()`. This means
 that the objects returned in `BP_Friends_Friendship::get_friendships()`
 can be real `BP_Friends_Friendship` objects and still use the primed
 cache. (This was basically lifted from @boonebgorges' recent changes to
 `BP_Groups_Group` which are awesome.)

 Unit tests are passing, and the changes seem to be working as expected.
 Thanks for your feedback!

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6978#comment:11>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list