Action hook 'wp_cache_set_last_changed'

in WP Core File wp-includes/functions.php at line 8077

View Source

wp_cache_set_last_changed

Action Hook
Description
Fires after a cache group `last_changed` time is updated. This may occur multiple times per page load and registered actions must be performant.

Hook Information

File Location wp-includes/functions.php View on GitHub
Hook Type Action
Line Number 8077

Hook Parameters

Type Name Description
string $group The cache group name.
string $time The new last changed time (msec sec).
string|false $previous_time The previous last changed time. False if not previously set.

Usage Examples

Basic Usage
<?php
// Hook into wp_cache_set_last_changed
add_action('wp_cache_set_last_changed', 'my_custom_function', 10, 3);

function my_custom_function($group, $time, $previous_time) {
    // Your custom code here
}

Source Code Context

wp-includes/functions.php:8077 - How this hook is used in WordPress core
<?php
8072  	 *
8073  	 * @param string       $group         The cache group name.
8074  	 * @param string       $time          The new last changed time (msec sec).
8075  	 * @param string|false $previous_time The previous last changed time. False if not previously set.
8076  	 */
8077  	do_action( 'wp_cache_set_last_changed', $group, $time, $previous_time );
8078  
8079  	return $time;
8080  }
8081  
8082  /**

PHP Documentation

<?php
/**
	 * Fires after a cache group `last_changed` time is updated.
	 * This may occur multiple times per page load and registered
	 * actions must be performant.
	 *
	 * @since 6.3.0
	 *
	 * @param string       $group         The cache group name.
	 * @param string       $time          The new last changed time (msec sec).
	 * @param string|false $previous_time The previous last changed time. False if not previously set.
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 3
  • File: wp-includes/functions.php
Related Hooks

Related hooks will be displayed here in future updates.