action_scheduler_queue_runner_flush_cache хук-фильтрWC 1.0

When an external object cache is in use, and when wp_cache_flush_runtime() is not available, then normally the cache will not be flushed after processing a batch of actions (to avoid a performance penalty for other processes).

This filter makes it possible to override this behavior and always flush the cache, even if an external object cache is in use.


add_filter( 'action_scheduler_queue_runner_flush_cache', 'wp_kama_action_scheduler_queue_runner_flush_cache_filter' );

 * Function for `action_scheduler_queue_runner_flush_cache` filter-hook.
 * @param bool $flush_cache If the cache should be flushed.
 * @return bool
function wp_kama_action_scheduler_queue_runner_flush_cache_filter( $flush_cache ){

	// filter...
	return $flush_cache;
If the cache should be flushed.

Список изменений

С версии 1.0 Введена.

Где вызывается хук

woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php 215
|| apply_filters( 'action_scheduler_queue_runner_flush_cache', false )

Где используется хук в WooCommerce

Использование не найдено.