函数文档

wp_cache_set_users_last_changed()

💡 云策文档标注

概述

wp_cache_set_users_last_changed() 是一个 WordPress 函数,用于设置 'users' 缓存组的最后更改时间。它通过调用 wp_cache_set_last_changed() 实现,确保用户缓存数据能及时失效和更新。

关键要点

  • 函数 wp_cache_set_users_last_changed() 专门针对 'users' 缓存组操作,设置其最后更改时间为当前时间。
  • 内部实现是调用 wp_cache_set_last_changed('users'),这是一个通用的缓存组时间设置函数。
  • 该函数在 WordPress 6.3.0 版本中引入,用于支持用户缓存管理。
  • 相关函数包括 clean_user_cache(),它用于清理所有用户缓存,可能依赖此时间戳来触发缓存失效。

📄 原文内容

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

Source

function wp_cache_set_users_last_changed() {
	wp_cache_set_last_changed( 'users' );
}

Changelog

Version Description
6.3.0 Introduced.