Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/29/2016 02:16:02 AM (8 years ago)
Author:
boonebgorges
Message:

XProfile: Add caching for fetching a field ID by name.

Fixes #7404.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-cache.php

    r10434 r11352  
    307307add_action( 'xprofile_field_after_save', 'bp_xprofile_clear_field_cache' );
    308308
     309/**
     310 * Clear the field-name cache.
     311 *
     312 * @since 2.8.0
     313 */
     314function bp_xprofile_reset_fields_by_name_cache_incrementor() {
     315    bp_core_reset_incrementor( 'bp_xprofile_fields_by_name' );
     316}
     317add_action( 'xprofile_field_before_save', 'bp_xprofile_reset_fields_by_name_cache_incrementor' );
     318
    309319// List actions to clear super cached pages on, if super cache is installed.
    310320add_action( 'xprofile_updated_profile', 'bp_core_clear_cache' );
Note: See TracChangeset for help on using the changeset viewer.