wp_cache_get_last_changed

Get last changed date for the specified cache group.

Description

(string) wp_cache_get_last_changed( $group ); 

Returns (string)

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

Parameters (1)

0. $group
Where the cache contents are grouped.

Usage

  1. if ( !function_exists( 'wp_cache_get_last_changed' ) ) { 
  2. require_once ABSPATH . WPINC . '/functions.php'; 
  3.  
  4. // Where the cache contents are grouped. 
  5. $group = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_cache_get_last_changed($group); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/functions.php  
  1. function wp_cache_get_last_changed( $group ) { 
  2. $last_changed = wp_cache_get( 'last_changed', $group ); 
  3.  
  4. if ( ! $last_changed ) { 
  5. $last_changed = microtime(); 
  6. wp_cache_set( 'last_changed', $last_changed, $group ); 
  7.  
  8. return $last_changed;