Files
Umbraco-CMS/src/Umbraco.Web/Cache/ApplicationCacheRefresher.cs

47 lines
1.2 KiB
C#
Raw Normal View History

2013-04-04 21:57:41 +06:00
using System;
using Umbraco.Core.Cache;
namespace Umbraco.Web.Cache
{
public sealed class ApplicationCacheRefresher : CacheRefresherBase<ApplicationCacheRefresher>
{
public ApplicationCacheRefresher(CacheHelper cacheHelper)
: base(cacheHelper)
{ }
#region Define
2013-04-04 21:57:41 +06:00
2017-07-11 19:21:13 +02:00
protected override ApplicationCacheRefresher This => this;
2013-04-04 21:57:41 +06:00
public static readonly Guid UniqueId = Guid.Parse("B15F34A1-BC1D-4F8B-8369-3222728AB4C8");
public override Guid RefresherUniqueId => UniqueId;
public override string Name => "Application Cache Refresher";
#endregion
#region Refresher
2013-04-04 21:57:41 +06:00
public override void RefreshAll()
{
CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey);
base.RefreshAll();
2013-04-04 21:57:41 +06:00
}
public override void Refresh(int id)
{
Remove(id);
base.Refresh(id);
2013-04-04 21:57:41 +06:00
}
public override void Remove(int id)
{
CacheHelper.RuntimeCache.ClearCacheItem(CacheKeys.ApplicationsCacheKey);
base.Remove(id);
2013-04-04 21:57:41 +06:00
}
#endregion
2013-04-04 21:57:41 +06:00
}
2017-07-20 11:21:28 +02:00
}