From 00b5f59bce8a74feeab5efc1915908790c12ca34 Mon Sep 17 00:00:00 2001 From: Shannon Date: Mon, 14 Oct 2019 22:09:47 +1100 Subject: [PATCH] simplifies lang refresher a bit --- src/Umbraco.Web/Cache/LanguageCacheRefresher.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs b/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs index 2877874e5a..8463acd6e0 100644 --- a/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/LanguageCacheRefresher.cs @@ -45,9 +45,6 @@ namespace Umbraco.Web.Cache //clear all no matter what type of payload ClearAllIsolatedCacheByEntityType(); - //clear all no matter what type of payload - RefreshDomains(); - foreach (var payload in payloads) { switch (payload.ChangeType) @@ -56,9 +53,6 @@ namespace Umbraco.Web.Cache clearDictionary = true; break; case LanguageChangeType.Remove: - clearDictionary = true; - clearContent = true; - break; case LanguageChangeType.ChangeCulture: clearDictionary = true; clearContent = true; @@ -74,6 +68,8 @@ namespace Umbraco.Web.Cache //if this flag is set, we will tell the published snapshot service to refresh ALL content and evict ALL IContent items if (clearContent) { + //clear all domain caches + RefreshDomains(); ContentCacheRefresher.RefreshContentTypes(AppCaches); // we need to evict all IContent items //now refresh all nucache var clearContentPayload = new[] { new ContentCacheRefresher.JsonPayload(0, null, TreeChangeTypes.RefreshAll) };