Will clean the post in the cache.

Cleaning means delete from the cache of the post. Will call to clean the term object cache associated with the post ID.

This function not run if $_wp_suspend_cache_invalidation is not empty. See wp_suspend_cache_invalidation().

Signature

clean_post_cache( $post )
post
 (int|WP_Post) Post ID or post object to remove from the cache.

Return

(void)

Source

function clean_post_cache( $post ) {
	global $_wp_suspend_cache_invalidation, $wpdb;

	if ( ! empty( $_wp_suspend_cache_invalidation ) )
		return;

	$post = get_post( $post );
	if ( empty( $post ) )
		return;

	wp_cache_delete( $post->ID, 'posts' );
	wp_cache_delete( $post->ID, 'post_meta' );

	clean_object_term_cache( $post->ID, $post->post_type );

	wp_cache_delete( 'wp_get_archives', 'general' );

	/**
	 * Fires immediately after the given post's cache is cleaned.
	 *
22 more lines...
WP Trac GitHub

Link here