xprofile_clear_profile_field_object_cache( BP_XProfile_Field $field_obj )

Clear caches when a field object is modified.


Description Description


Parameters Parameters

$field_obj

(Required) Field object cache to delete.


Top ↑

Source Source

File: bp-xprofile/bp-xprofile-cache.php

function xprofile_clear_profile_field_object_cache( $field_obj ) {

	// Clear default visibility level cache.
	wp_cache_delete( 'default_visibility_levels', 'bp_xprofile' );

	// Modified fields can alter parent group status, in particular when
	// the group goes from empty to non-empty. Bust its cache, as well as
	// the global 'all' cache.
	wp_cache_delete( 'all',                'bp_xprofile_groups' );
	wp_cache_delete( $field_obj->group_id, 'bp_xprofile_groups' );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.