From 43ee6f288ea0b4249a6f411b03f29273fa809837 Mon Sep 17 00:00:00 2001 From: Shannon Date: Mon, 24 May 2021 11:25:03 -0700 Subject: [PATCH] fixes initialize flag --- src/Umbraco.Web/Search/ExamineFinalComponent.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Search/ExamineFinalComponent.cs b/src/Umbraco.Web/Search/ExamineFinalComponent.cs index 22dcb43cc0..335d19baf0 100644 --- a/src/Umbraco.Web/Search/ExamineFinalComponent.cs +++ b/src/Umbraco.Web/Search/ExamineFinalComponent.cs @@ -56,6 +56,8 @@ namespace Umbraco.Web.Search // double check lock, we must only do this once if (!_initialized) { + _initialized = true; + if (!_mainDom.IsMainDom) return; var bootState = _syncBootStateAccessor.GetSyncBootState(); @@ -63,7 +65,8 @@ namespace Umbraco.Web.Search _examineManager.ConfigureIndexes(_mainDom, _logger); // if it's a cold boot, rebuild all indexes including non-empty ones - _indexRebuilder.RebuildIndexes(bootState != SyncBootState.ColdBoot, 0); + // delay one minute since a cold boot also triggers nucache rebuilds + _indexRebuilder.RebuildIndexes(bootState != SyncBootState.ColdBoot, 60000); } } }