[buddypress-trac] [BuddyPress Trac] #5733: Use wp_cache_add_global_groups() so cache is applicable throughout multisite

buddypress-trac noreply at wordpress.org
Sun Nov 2 17:23:05 UTC 2014

#5733: Use wp_cache_add_global_groups() so cache is applicable throughout
 Reporter:  wpdennis      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Core          |     Version:  2.0
 Severity:  minor         |  Resolution:
 Keywords:  2nd-opinion   |

Comment (by johnjamesjacoby):

 Forgot to mention, running my attached patch on several BuddyPress
 networks has yielded positive and expected results. Having the ability to
 manipulate the global cache key helps separate the groups into separate
 global buckets, and completely avoids the cross-talk I was seeing earlier.

 It does, however, beg us to ask a separate question, which is: what
 constitutes a truly global cache group for BuddyPress? Maybe surprisingly,
 network activating BuddyPress isn't enough. Even though we (safely) assume
 BuddyPress's tables should be created as 'global tables', that doesn't
 immediately mean the installation type mirrors that, or that cached data
 across networks should share data, cached or otherwise.

 WordPress's global cache groups are almost always truly global groups. In
 the event completely separate groups are wanted, the `WP_CACHE_KEY_SALT`
 constant (dangerously) exists to allow even users to have separate groups
 for each global and blog prefix.

 In these (somewhat edge-case) scenarios, having the ability to unhook
 and/or override `bp_core_add_global_group()` is helpful, as is the ability
 to filter `bp_core_get_global_cache_key` at runtime. The application layer
 doesn't care what other global groups exist or are/were/aren't registered,
 so we can safely toggle them.

 TL;DR: My proposed patch is working great, is an incremental improvement
 over what we have today, and helps us start to map out our cache group vs.
 installation scope relationships.

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

More information about the buddypress-trac mailing list