bp_blogs_update_meta_cache( int|string|array|bool $blog_ids = false )
Slurp up blogmeta for a specified set of blogs.
Description
It grabs all blogmeta associated with all of the blogs passed in $blog_ids and adds it to the WP cache. This improves efficiency when using querying blogmeta inline.
Parameters
- $blog_ids
-
(Optional) Accepts a single blog ID, or a comma- separated list or array of blog IDs.
Default value: false
Source
File: bp-blogs/bp-blogs-cache.php
function bp_blogs_update_meta_cache( $blog_ids = false ) {
$cache_args = array(
'object_ids' => $blog_ids,
'object_type' => buddypress()->blogs->id,
'object_column' => 'blog_id',
'cache_group' => 'blog_meta',
'meta_table' => buddypress()->blogs->table_name_blogmeta,
);
bp_update_meta_cache( $cache_args );
}
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.