From ec834890ac0a0007394c6818d598c598f8f3d929 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Thu, 24 Aug 2023 14:54:36 +0300 Subject: [PATCH] Forcing touch(..) of config files which are stale due to newer includes --- config.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config.inc.php b/config.inc.php index 8a45f7f..5b82d0e 100644 --- a/config.inc.php +++ b/config.inc.php @@ -362,7 +362,7 @@ function config_fetch_ex( return $result; } -function _config_fetch_cache_ex($results_by_job) +function _config_fetch_cache_ex(array $results_by_job) { $result = new ConfigFetchResult(); $total_stales = 0; @@ -387,6 +387,10 @@ function _config_fetch_cache_ex($results_by_job) { $is_stale = true; $cache_entry = _config_invalidate_cache($file, $cache_file); + //NOTE: let's change the mtime of the file which include other files, + // so that on tne next build it will be 'older' than its includes + // and won't trigger rebuild + touch($file); } if($is_stale)