[buddypress-trac] [BuddyPress Trac] #5451: Groups query overhaul
buddypress-trac
noreply at wordpress.org
Fri Sep 9 16:24:04 UTC 2016
#5451: Groups query overhaul
-----------------------------------+------------------
Reporter: boonebgorges | Owner:
Type: enhancement | Status: new
Priority: high | Milestone: 2.7
Component: Groups | Version:
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion |
-----------------------------------+------------------
Comment (by boonebgorges):
> Better pre-loop caching for group admins. With object caching disabled,
bp_get_group_join_button() is causing a query for every group in the loop.
#5711 added cache support for get_group_administrator_ids(), so all we'd
need is single query at the beginning of a group loop that pre-fetches
these admin lists and puts them into the cache.
[attachment:5451.2.diff] implements this. It saves 19 queries when viewing
the group directory without persistent caching, which is nice :-D @r-a-y -
you're the author of the original caching in #5711. Would you mind giving
my approach a sanity check? The weirdness with `stdClass` is to ensure
compatibility with the existing format of the cache values.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5451#comment:24>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list