Fixes security check on content controller for the correct publish letter. Adds cache listeners to the MacroService. Ensures the status message is cleared when a form is reset.

This commit is contained in:
Shannon
2013-10-31 17:22:10 +11:00
parent 719b777188
commit 90c62bddd9
5 changed files with 86 additions and 3 deletions

View File

@@ -310,7 +310,35 @@ namespace Umbraco.Web.Cache
//NOTE: The 'false' ensure that it will only refresh on the current server, not post to all servers
dc.RefreshAll(new Guid(DistributedCache.MacroCacheRefresherId), false);
}
/// <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, IMacro macro)
{
if (macro != null)
{
dc.RefreshByJson(new Guid(DistributedCache.MacroCacheRefresherId),
MacroCacheRefresher.SerializeToJsonPayload(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, IMacro macro)
{
if (macro != null)
{
dc.RefreshByJson(new Guid(DistributedCache.MacroCacheRefresherId),
MacroCacheRefresher.SerializeToJsonPayload(macro));
}
}
/// <summary>
/// Refreshes the cache amongst servers for a macro item
/// </summary>