wp_cache_set_last_changed
Fires after a cache group last_changed time is updated. This may occur multiple times per page load and registered actions must be performant.
Использование
add_action( 'wp_cache_set_last_changed', 'wp_kama_cache_set_last_changed_action', 10, 3 );
/**
* Function for `wp_cache_set_last_changed` action-hook.
*
* @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.
*
* @return void
*/
function wp_kama_cache_set_last_changed_action( $group, $time, $previous_time ){
// action...
}
- $group(строка)
- The cache group name.
- $time(строка)
- The new last changed time (msec sec).
- $previous_time(строка|false)
- The previous last changed time. False if not previously set.
Список изменений
| С версии 6.3.0 | Введена. |
Где вызывается хук
wp_cache_set_last_changed
wp-includes/functions.php 8129
do_action( 'wp_cache_set_last_changed', $group, $time, $previous_time );