public static void RemoveMacroCache(this DistributedCache dc, macro macro)
 {
     if (macro == null || macro.Model == null)
     {
         return;
     }
     dc.RefreshByJson(DistributedCache.MacroCacheRefresherGuid, MacroCacheRefresher.SerializeToJsonPayload(macro));
 }
Exemple #2
0
 /// <summary>
 /// Removes the cache amongst servers for a macro item
 /// </summary>
 /// <param name="dc"></param>
 /// <param name="macro"></param>
 public static void RemoveMacroCache(this DistributedCache dc, macro macro)
 {
     if (macro != null && macro.Model != null)
     {
         dc.RefreshByJson(new Guid(DistributedCache.MacroCacheRefresherId),
                          MacroCacheRefresher.SerializeToJsonPayload(macro));
     }
 }
 public static void RemoveMacroCache(this DistributedCache dc, global::umbraco.cms.businesslogic.macro.Macro macro)
 {
     if (macro == null)
     {
         return;
     }
     dc.RefreshByJson(DistributedCache.MacroCacheRefresherGuid, MacroCacheRefresher.SerializeToJsonPayload(macro));
 }
Exemple #4
0
 /// <summary>
 /// Refreshes the cache amongst servers for a macro item
 /// </summary>
 /// <param name="dc"></param>
 /// <param name="macro"></param>
 public static void RefreshMacroCache(this DistributedCache dc, global::umbraco.cms.businesslogic.macro.Macro macro)
 {
     if (macro != null)
     {
         dc.RefreshByJson(new Guid(DistributedCache.MacroCacheRefresherId),
                          MacroCacheRefresher.SerializeToJsonPayload(macro));
     }
 }