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();
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);
}