WordPress at a glance
function is not described

clean_object_term_cache() WP 2.3.0

Removes the taxonomy relationship to terms from the cache.

Will remove the entire taxonomy relationship containing term $object_id. The term IDs have to exist within the taxonomy $object_type for the deletion to take place.

  • Global. true/false. $_wp_suspend_cache_invalidation
  • See: get_object_taxonomies() for more on $object_type.
Hooks in function
Return

Nothing (null).

Usage

clean_object_term_cache( $object_ids, $object_type );
$object_ids(int/array) (required)
Single or list of term object ID(s).
$object_type(array/string) (required)
The taxonomy object type.

Code of clean object term cache: wp-includes/taxonomy.php VER 5.0.3

<?php
function clean_object_term_cache($object_ids, $object_type) {
	global $_wp_suspend_cache_invalidation;

	if ( ! empty( $_wp_suspend_cache_invalidation ) ) {
		return;
	}

	if ( !is_array($object_ids) )
		$object_ids = array($object_ids);

	$taxonomies = get_object_taxonomies( $object_type );

	foreach ( $object_ids as $id ) {
		foreach ( $taxonomies as $taxonomy ) {
			wp_cache_delete($id, "{$taxonomy}_relationships");
		}
	}

	/**
	 * Fires after the object term cache has been cleaned.
	 *
	 * @since 2.5.0
	 *
	 * @param array  $object_ids An array of object IDs.
	 * @param string $object_type Object type.
	 */
	do_action( 'clean_object_term_cache', $object_ids, $object_type );
}