Files
Umbraco-CMS/src/Umbraco.Web/Cache/ApplicationTreeCacheRefresher.cs
Shannon Deminick 495b4ed9e0 Refactors the WebSecurity class to not be static and be part of the UmbracoContext. Makes a few methods internal on it so that
it's not relying on the legacy User class. Cleans up the new BasePage and EnsuredUmbracoPage
2013-04-04 23:30:17 +06:00

43 lines
1.2 KiB
C#

using System;
using Umbraco.Core;
using Umbraco.Core.Cache;
namespace Umbraco.Web.Cache
{
/// <summary>
/// Handles Application tree cache invalidation/refreshing
/// </summary>
public sealed class ApplicationTreeCacheRefresher : CacheRefresherBase<ApplicationTreeCacheRefresher>
{
protected override ApplicationTreeCacheRefresher Instance
{
get { return this; }
}
public override Guid UniqueIdentifier
{
get { return Guid.Parse(DistributedCache.ApplicationTreeCacheRefresherId); }
}
public override string Name
{
get { return "Applications tree cache refresher"; }
}
public override void RefreshAll()
{
ApplicationContext.Current.ApplicationCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey);
}
public override void Refresh(int id)
{
Remove(id);
}
public override void Remove(int id)
{
ApplicationContext.Current.ApplicationCache.ClearCacheItem(CacheKeys.ApplicationTreeCacheKey);
}
}
}