[buddypress-trac] [BuddyPress Trac] #6567: Cache issue on bp directory pages with multisite installtion
buddypress-trac
noreply at wordpress.org
Mon Jul 27 13:12:23 UTC 2015
#6567: Cache issue on bp directory pages with multisite installtion
------------------------------+-----------------------------
Reporter: mhawksey | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Component - Core | Version: 2.3.2
Severity: normal | Keywords:
------------------------------+-----------------------------
In a multisite installation with object cache
`bp_core_get_directory_pages()` returns incorrect directory pages as
`wp_cache_get()` are not site isolated. From bp-core-functions.php:
{{{
// Look in cache first
$pages = wp_cache_get( 'directory_pages', 'bp' );
}}}
This results in errors on BP component pages:
>Warning: in_array() expects parameter 2 to be array, null given in ...
/plugins/buddypress/bp-core/bp-core-filters.php on line 192
A similar issue was discussed in #5733 but the fix does not extend to
`bp_core_get_directory_pages()` or other 'bp' grouped caches.
We’ve fixed our own install with:
{{{
add_filter('bp_core_get_directory_pages',
'bp_core_get_directory_pages_cache_mod');
}}}
which suffixes the cache group with the root blog id. My concern is that
this is not the only cache call. For further info we are using BP Multi
Network plugin for the multisite installation.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6567>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list