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

@@ -111,6 +111,8 @@ namespace Umbraco.Web.Cache
Macro.AfterSave += MacroAfterSave;
Macro.AfterDelete += MacroAfterDelete;
MacroService.Saved += MacroServiceSaved;
MacroService.Deleted += MacroServiceDeleted;
//Bind to member events
@@ -498,6 +500,23 @@ namespace Umbraco.Web.Cache
#endregion
#region Macro event handlers
void MacroServiceDeleted(IMacroService sender, Core.Events.DeleteEventArgs<IMacro> e)
{
foreach (var entity in e.DeletedEntities)
{
DistributedCache.Instance.RemoveMacroCache(entity);
}
}
void MacroServiceSaved(IMacroService sender, Core.Events.SaveEventArgs<IMacro> e)
{
foreach (var entity in e.SavedEntities)
{
DistributedCache.Instance.RefreshMacroCache(entity);
}
}
/// <summary>
/// Flush macro from cache
/// </summary>