函数文档

wp_cache_set_comments_last_changed()

💡 云策文档标注

概述

wp_cache_set_comments_last_changed() 是一个 WordPress 函数,用于设置 'comment' 缓存组的最后更改时间,以支持缓存失效机制。

关键要点

  • 函数调用 wp_cache_set_last_changed('comment') 来更新 'comment' 缓存组的最后更改时间戳。
  • 主要用于 clean_comment_cache() 函数中,当评论缓存被清理时触发,确保缓存数据及时失效。
  • 自 WordPress 5.0.0 版本引入,是缓存管理的一部分。

📄 原文内容

Sets the last changed time for the ‘comment’ cache group.

Source

function wp_cache_set_comments_last_changed() {
	wp_cache_set_last_changed( 'comment' );
}

Changelog

Version Description
5.0.0 Introduced.