wp_cache_get_last_changed

函数


wp_cache_get_last_changed ( $group )
参数
  • (string)
    $group
    Where the cache contents are grouped.
    Required:
返回值
  • (string) UNIX timestamp with microseconds representing when the group was last changed.
定义位置
  • wp-includes/functions.php
    , line 7606
引入
4.7.0
弃用

Gets last changed date for the specified cache group.

function wp_cache_get_last_changed( $group ) {
	$last_changed = wp_cache_get( 'last_changed', $group );

	if ( ! $last_changed ) {
		$last_changed = microtime();
		wp_cache_set( 'last_changed', $last_changed, $group );
	}

	return $last_changed;
}