Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/09/2015 09:39:40 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Switch most cache groups to global using new BP_Component::setup_cache_groups() methods.

This fixes issues with querying BuddyPress data from non-root sites, possibly creating duplicate cache entries across sites, and generally wrecking havoc with persistent cache setups.

Props r-a-y. See #5733.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-loader.php

    r9315 r9338  
    677677        parent::setup_title();
    678678    }
     679
     680    /**
     681     * Setup cache groups
     682     *
     683     * @since BuddyPress (2.2.0)
     684     */
     685    public function setup_cache_groups() {
     686
     687        // Global groups
     688        wp_cache_add_global_groups( array(
     689            'bp_groups',
     690            'bp_group_admins',
     691            'bp_group_invite_count',
     692            'group_meta'
     693        ) );
     694
     695        parent::setup_cache_groups();
     696    }
    679697}
    680698
Note: See TracChangeset for help on using the changeset viewer.