From bef6b8cd4c55ffa90f88ae2bffd239a6f914cc60 Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 15 Jun 2015 14:45:16 +0200 Subject: [PATCH] U4-5162 - do not cache macro if previewing --- src/Umbraco.Web/umbraco.presentation/macro.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/umbraco.presentation/macro.cs b/src/Umbraco.Web/umbraco.presentation/macro.cs index 7b9c63e6b8..136c30c799 100644 --- a/src/Umbraco.Web/umbraco.presentation/macro.cs +++ b/src/Umbraco.Web/umbraco.presentation/macro.cs @@ -537,8 +537,8 @@ namespace umbraco /// private Control AddMacroResultToCache(Control macroControl) { - // Add result to cache if successful - if (Model.CacheDuration > 0) + // Add result to cache if successful (and cache is enabled) + if (UmbracoContext.Current.InPreviewMode == false && Model.CacheDuration > 0) { // do not add to cache if there's no member and it should cache by personalization if (!Model.CacheByMember || (Model.CacheByMember && Member.IsLoggedOn()))