A WordPress-centric search engine for devs and theme authors



wp_cache_get_last_changed ›

Since4.7.0
Deprecatedn/a
wp_cache_get_last_changed ( $group )
Parameters:
  • (string) $group Where the cache contents are grouped.
    Required: Yes
Returns:
  • (string) $last_changed UNIX timestamp with microseconds representing when the group was last changed.
Defined at:
Codex:

Get last changed date for the specified cache group.



Source

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;
}