Changeset 5460 for trunk/bp-groups/bp-groups-cache.php
- Timestamp:
- 12/08/2011 02:57:38 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-cache.php
r4961 r5460 12 12 // Exit if accessed directly 13 13 if ( !defined( 'ABSPATH' ) ) exit; 14 15 /** 16 * Slurps up groupmeta 17 * 18 * This function is called in two places in the BP_Groups_Group class: 19 * - in the populate() method, when single group objects are populated 20 * - in the get() method, when multiple groups are queried 21 * 22 * It grabs all groupmeta associated with all of the groups passed in $group_ids and adds it to 23 * the WP cache. This improves efficiency when using groupmeta inline 24 * 25 * @param int|str|array $group_ids Accepts a single group_id, or a comma-separated list or array of 26 * group ids 27 */ 28 function bp_groups_update_meta_cache( $group_ids = false ) { 29 global $bp; 30 31 $cache_args = array( 32 'object_ids' => $group_ids, 33 'object_type' => $bp->groups->id, 34 'object_column' => 'group_id', 35 'meta_table' => $bp->groups->table_name_groupmeta, 36 'cache_key_prefix' => 'bp_groups_groupmeta' 37 ); 38 39 bp_update_meta_cache( $cache_args ); 40 } 14 41 15 42 function groups_clear_group_object_cache( $group_id ) {
Note: See TracChangeset
for help on using the changeset viewer.