首页 WordPress函数大全 clean_attachment_cache()

clean_attachment_cache()

2020-05-01 / 3359阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

clean_attachment_cache( int $id, bool $clean_terms = false )

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.

参数

$id

(int)
(Required)
The attachment ID in the cache to clean.

$clean_terms

(bool)
(Optional)
Whether to clean terms cache.

Default value: false

大家谈论
    我的见解