[buddypress-trac] [BuddyPress Trac] #5711: BP_Groups_Member::get_group_administrator_ids() not cached
buddypress-trac
noreply at wordpress.org
Mon Jun 16 20:19:57 UTC 2014
#5711: BP_Groups_Member::get_group_administrator_ids() not cached
------------------------------+---------------------
Reporter: r-a-y | Owner: r-a-y
Type: enhancement | Status: closed
Priority: normal | Milestone: 2.1
Component: Groups | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch commit |
------------------------------+---------------------
Changes (by r-a-y):
* owner: => r-a-y
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"8537"]:
{{{
#!CommitTicketReference repository="" revision="8537"
Groups: Cache calls to BP_Groups_Member::get_group_administrator_ids()
When a logged-in user is viewing the group directory and is a member of
each group in the loop, when rendering the "Leave Group" button, a call
is done to fetch the group admins of each group to determine whether the
user is the sole admin.
Since this query is uncached, this could lead to twenty additional DB
queries being run on the page. Thus, this commit caches this query and
invalidates the cache whenever a group member is promoted / demoted or
saved into the database.
Fixes #5711.
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5711#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list