using System;
using Umbraco.Core;
using Umbraco.Core.Cache;
using Umbraco.Core.Models;
namespace Umbraco.Web.Cache
{
///
/// A cache refresher to ensure the dictionary cache is refreshed when dictionary change
///
public sealed class DictionaryCacheRefresher : CacheRefresherBase
{
protected override DictionaryCacheRefresher Instance
{
get { return this; }
}
public override Guid UniqueIdentifier
{
get { return new Guid(DistributedCache.DictionaryCacheRefresherId); }
}
public override string Name
{
get { return "Dictionary cache refresher"; }
}
public override void Refresh(int id)
{
ClearAllIsolatedCacheByEntityType();
base.Refresh(id);
}
public override void Remove(int id)
{
ClearAllIsolatedCacheByEntityType();
base.Remove(id);
}
}
}