Files
Umbraco-CMS/src/Umbraco.Core/Cache/DictionaryCacheRefresher.cs

41 lines
1008 B
C#
Raw Normal View History

2018-06-29 19:52:40 +02:00
using System;
using Umbraco.Cms.Core.Models;
2018-06-29 19:52:40 +02:00
namespace Umbraco.Cms.Core.Cache
2018-06-29 19:52:40 +02:00
{
public sealed class DictionaryCacheRefresher : CacheRefresherBase<DictionaryCacheRefresher>
{
2019-01-17 08:34:29 +01:00
public DictionaryCacheRefresher(AppCaches appCaches)
: base(appCaches)
2018-06-29 19:52:40 +02:00
{ }
#region Define
protected override DictionaryCacheRefresher This => this;
public static readonly Guid UniqueId = Guid.Parse("D1D7E227-F817-4816-BFE9-6C39B6152884");
public override Guid RefresherUniqueId => UniqueId;
public override string Name => "Dictionary Cache Refresher";
#endregion
#region Refresher
public override void Refresh(int id)
{
ClearAllIsolatedCacheByEntityType<IDictionaryItem>();
base.Refresh(id);
}
public override void Remove(int id)
{
ClearAllIsolatedCacheByEntityType<IDictionaryItem>();
base.Remove(id);
}
#endregion
}
}