clean_attachment_cache ( $id, $clean_terms = false )

  • (int) $id The attachment ID in the cache to clean.
  • (bool) $clean_terms Optional. Whether to clean terms cache. Default false.
Defined at:


Will clean the attachment in the cache.

Cleaning means delete from the cache. Optionally will clean the term object cache associated with the attachment ID.

This function will not run if $_wp_suspend_cache_invalidation is not empty.

Related Functions

clean_comment_cache, wp_clean_themes_cache, clean_term_cache, clean_page_cache, clean_taxonomy_cache

Top Google Results

User discussions

wpseek mobile