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

buddypress-trac noreply at wordpress.org
Sat Oct 11 15:58:52 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):

 Replying to [comment:5 DJPaul]:
 > I think this is going to be a bit of a can of worms, but it is something
 we should talk about in terms of how BuddyPress does/should work across

 There are actually three potential cache scopes to consider:

 * Global
 * Network
 * Blog

 Unfortunately, most traditional cache plugins only consider
 `$global_prefix` and `$blog_prefix` without support for a
 `$network_prefix` group or bucket. These prefixes typically use the
 `$table_prefix` global (traditionally defined in `wp-config.php`) for
 namespacing the difference between global and blog scopes, and since that
 doesn't change between networks, neither do the cache buckets.

 The Global scope will traditionally include:
 * `users`, `userlogins`, `usermeta`, `site-options`, `site-lookup`, `blog-
 lookup`, `blog-details`, & `rss` WordPress core buckets
 * The `bp` bucket for BuddyPress when network activated on a 1 network
 installation, added via `bp_core_add_global_group()`.

 The Blog scope includes basically everything else.
 * Note that if `bp_is_multiblog_mode` is enabled, our global buckets
 should revert to blog buckets.


 The conclusion I've come to is two-fold:
 * What we consider to be "global" needs an audit. (I.E. Should
 `bp_activity_sitewide_front` really be global, or is `bp_activity` more
 * The `bp` global cache bucket needs a filter on it, so a network ID can
 be added in multi-network installations, and so they can be downgraded to
 blog buckets in multi-blog mode.

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

More information about the buddypress-trac mailing list