MacroCacheRefresher also implements ICacheRefresher<macro>

This commit is contained in:
Shannon Deminick
2013-03-12 17:08:31 +04:00
parent 8d2e466e34
commit cf64c0243c
4 changed files with 43 additions and 6 deletions

View File

@@ -195,5 +195,18 @@ namespace Umbraco.Web.Cache
dc.Remove(new Guid(DistributedCache.MacroCacheRefresherId), macro1 => macro1.Id, macro);
}
}
/// <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.Remove(new Guid(DistributedCache.MacroCacheRefresherId), macro1 => macro1.Model.Id, macro);
}
}
}
}