删除匹配键和组的缓存内容。
原型
wp_cache_delete( int|string $key, string $group = '' )
参数
$key
(int|string)
(Required)
调用缓存中的内容是什么。
$group
(string)
(Optional)
缓存内容分组的位置。
返回值
(bool)
成功删除时为真,失败时为假。
源文件
路径:wp-includes/cache.php
<?php
...
function wp_cache_delete( $key, $group = '' ) {
global $wp_object_cache;
return $wp_object_cache->delete($key, $group);
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/wp_cache_delete/