W3cubDocs

/WordPress

wp_cache_get_last_changed( string $group ): string

Gets last changed date for the specified cache group.

Parameters

$groupstringrequired
Where the cache contents are grouped.

Return

string UNIX timestamp with microseconds representing when the group was last changed.

Source

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

	if ( $last_changed ) {
		return $last_changed;
	}

	return wp_cache_set_last_changed( $group );
}

Changelog

Version Description
4.7.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_cache_get_last_changed