Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/09/2015 09:39:40 PM (12 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-messages/bp-messages-loader.php

    r9214 r9338  
    293293                parent::setup_title();
    294294        }
     295
     296        /**
     297         * Setup cache groups
     298         *
     299         * @since BuddyPress (2.2.0)
     300         */
     301        public function setup_cache_groups() {
     302
     303                // Global groups
     304                wp_cache_add_global_groups( array(
     305                        'bp_messages',
     306                        'bp_messages_unread_count',
     307                        'message_meta'
     308                ) );
     309
     310                parent::setup_cache_groups();
     311        }
    295312}
    296313
Note: See TracChangeset for help on using the changeset viewer.