Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/17/2014 12:35:26 AM (8 years ago)
Author:
boonebgorges
Message:

Don't prime groupmeta cache in BP_Groups_Group::construct()

groups_get_groupmeta() now uses the core API functions. get_metadata() works by
priming the cache with *all* object metadata when requesting any piece of
metadata for that object. This means that, instead of pre-fetching groupmeta
when instantiating BP_Groups_Group, we wait until it happens in get_metadata().
At best, this can help us to avoid pre-fetching a meta cache that will not be
used.

See #5398

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-classes.php

    r7898 r7903  
    176176
    177177        if ( $group = $wpdb->get_row( $wpdb->prepare( "SELECT g.* FROM {$bp->groups->table_name} g WHERE g.id = %d", $this->id ) ) ) {
    178             if ( ! empty( $this->args['update_meta_cache'] ) ) {
    179                 bp_groups_update_meta_cache( $this->id );
    180             }
    181 
    182178            $this->id                 = $group->id;
    183179            $this->creator_id         = $group->creator_id;
Note: See TracChangeset for help on using the changeset viewer.