From e8c25283b0ac899d6226876f5322e2d6a4608bcc Mon Sep 17 00:00:00 2001 From: Shannon Date: Mon, 17 Feb 2014 15:03:49 +1100 Subject: [PATCH] Fixes: U4-2876 Ensure runtime cache is cleared with ICacheRefreshers when macro's change since they use the RuntimeCacheProvider --- src/Umbraco.Web/Cache/MacroCacheRefresher.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs index ee77161ccc..19f56997ac 100644 --- a/src/Umbraco.Web/Cache/MacroCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/MacroCacheRefresher.cs @@ -4,6 +4,7 @@ using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Models; using umbraco; +using Umbraco.Core.Persistence.Caching; using umbraco.interfaces; using System.Linq; using Macro = umbraco.cms.businesslogic.macro.Macro; @@ -174,6 +175,8 @@ namespace Umbraco.Web.Cache prefix => ApplicationContext.Current.ApplicationCache.ClearCacheByKeySearch(prefix)); + RuntimeCacheProvider.Current.Clear(typeof (IMacro)); + base.RefreshAll(); } @@ -186,6 +189,8 @@ namespace Umbraco.Web.Cache GetCacheKeysForAlias(payload.Alias).ForEach( alias => ApplicationContext.Current.ApplicationCache.ClearCacheByKeySearch(alias)); + + RuntimeCacheProvider.Current.Delete(typeof(IMacro), payload.Id); }); base.Refresh(jsonPayload);