From 6cecde5d1302c5d922830313be3424270ba6ab80 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Wed, 27 Aug 2025 16:59:29 +0300 Subject: [PATCH] touch cache signal in block regeneration --- block-cache-manager.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/block-cache-manager.php b/block-cache-manager.php index fef11eb..1c61805 100644 --- a/block-cache-manager.php +++ b/block-cache-manager.php @@ -86,6 +86,10 @@ function clear_post_cache_based_on_conditions( $post_id, $post ) { clear_template_cache('template-parts/home/colon-item'); } + // Обновляем сигнальный файл + $fpc_signal = WP_CONTENT_DIR . '/uploads/fpcache/.last_modified'; + touch($fpc_signal); + } // Хук для обычного сохранения @@ -104,9 +108,4 @@ add_action('transition_post_status', function($new_status, $old_status, $post) { if (!current_user_can('edit_post', $post->ID)) return; // Используем $post->ID clear_post_cache_based_on_conditions($post->ID, $post); // Передаем только $post -}, 10, 3); - -?> - - - +}, 10, 3); \ No newline at end of file