[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 19:53:35 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):

 > I notice that your patch doesn't touch some of the other more specific
 cache buckets in BP

 Good eye. Because these buckets aren't registered as global, under a
 stereotypical memcached or APC setup, they'll end up being prefixed with
 either the `$blog_id` or `$table_prefix` globals. This isn't ideal for
 network-wide installations, because we run into the issue that wpdennis
 opened this ticket for originally, with duplicate cache entries for each
 blog they are queried from.

 > I assume it's possible to set up, at the level of the cache config,
 rules about how to route the various cache groups

 You are correct, and in many ways this does come down to a deficiency in
 configuring buckets, and WordPress core not needing per-network buckets,
 at least not yet. We basically need smart cache keys that are
 appropriately namespaced, based on the installation type. Too broad, and
 cached results will pour over into other networks; too narrow, and we
 cache the same data for each blog like wpdennis points out.

 The widespread fix is a full audit of all cache keys, funneling them
 through cache-key building functions, and filtering them based on the
 single/multi/site/blog/network configuration and activation types.

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

More information about the buddypress-trac mailing list