From 63d8ef75603d999533b07e165fb05401c5f7a6f2 Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 23 May 2017 11:21:18 +0200 Subject: [PATCH 1/2] U4-9936 - fix xml cache refresh in lb --- src/Umbraco.Web/Cache/PageCacheRefresher.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Cache/PageCacheRefresher.cs b/src/Umbraco.Web/Cache/PageCacheRefresher.cs index 83d38924ed..e884c9b3b8 100644 --- a/src/Umbraco.Web/Cache/PageCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/PageCacheRefresher.cs @@ -15,7 +15,7 @@ namespace Umbraco.Web.Cache /// /// If Load balancing is enabled (by default disabled, is set in umbracoSettings.config) PageCacheRefresher will be called /// everytime content is added/updated/removed to ensure that the content cache is identical on all load balanced servers - /// + /// public class PageCacheRefresher : TypedCacheRefresherBase { @@ -51,6 +51,7 @@ namespace Umbraco.Web.Cache public override void RefreshAll() { content.Instance.RefreshContentFromDatabase(); + XmlPublishedContent.ClearRequest(); base.RefreshAll(); } @@ -62,6 +63,7 @@ namespace Umbraco.Web.Cache { ApplicationContext.Current.ApplicationCache.ClearPartialViewCache(); content.Instance.UpdateDocumentCache(id); + XmlPublishedContent.ClearRequest(); DistributedCache.Instance.ClearAllMacroCacheOnCurrentServer(); DistributedCache.Instance.ClearXsltCacheOnCurrentServer(); base.Refresh(id); @@ -75,6 +77,7 @@ namespace Umbraco.Web.Cache { ApplicationContext.Current.ApplicationCache.ClearPartialViewCache(); content.Instance.ClearDocumentCache(id, false); + XmlPublishedContent.ClearRequest(); DistributedCache.Instance.ClearAllMacroCacheOnCurrentServer(); DistributedCache.Instance.ClearXsltCacheOnCurrentServer(); ClearAllIsolatedCacheByEntityType(); From 09ceb15d08fbb3e625ad2b2b61108556ce6b16f2 Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 23 May 2017 14:19:32 +0200 Subject: [PATCH 2/2] U4-9936 - fix xml cache refresh --- src/Umbraco.Web/umbraco.presentation/content.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/umbraco.presentation/content.cs b/src/Umbraco.Web/umbraco.presentation/content.cs index a96863ea09..54bb1ac2f1 100644 --- a/src/Umbraco.Web/umbraco.presentation/content.cs +++ b/src/Umbraco.Web/umbraco.presentation/content.cs @@ -511,7 +511,7 @@ namespace umbraco private void ClearContextCache() { var items = HttpContextItems; - if (items == null || items.Contains(XmlContextContentItemKey)) return; + if (items == null || items.Contains(XmlContextContentItemKey) == false) return; items.Remove(XmlContextContentItemKey); }