2017-07-20 11:21:28 +02:00
|
|
|
|
using System;
|
2014-03-27 14:28:45 +11:00
|
|
|
|
using Umbraco.Core.Cache;
|
2015-01-28 13:16:50 +11:00
|
|
|
|
using Umbraco.Core.Models;
|
2014-03-27 14:28:45 +11:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.Cache
|
|
|
|
|
|
{
|
2015-01-28 13:16:50 +11:00
|
|
|
|
public sealed class PublicAccessCacheRefresher : CacheRefresherBase<PublicAccessCacheRefresher>
|
2014-03-27 14:43:07 +11:00
|
|
|
|
{
|
2019-01-17 08:34:29 +01:00
|
|
|
|
public PublicAccessCacheRefresher(AppCaches appCaches)
|
|
|
|
|
|
: base(appCaches)
|
2016-05-26 17:12:04 +02:00
|
|
|
|
{ }
|
2016-05-18 18:44:08 +02:00
|
|
|
|
|
2016-05-26 17:12:04 +02:00
|
|
|
|
#region Define
|
2014-03-27 14:28:45 +11:00
|
|
|
|
|
2017-07-11 19:21:13 +02:00
|
|
|
|
protected override PublicAccessCacheRefresher This => this;
|
2014-03-27 14:28:45 +11:00
|
|
|
|
|
2016-05-26 17:12:04 +02:00
|
|
|
|
public static readonly Guid UniqueId = Guid.Parse("1DB08769-B104-4F8B-850E-169CAC1DF2EC");
|
|
|
|
|
|
|
|
|
|
|
|
public override Guid RefresherUniqueId => UniqueId;
|
|
|
|
|
|
|
|
|
|
|
|
public override string Name => "Public Access Cache Refresher";
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Refresher
|
2014-03-27 14:28:45 +11:00
|
|
|
|
|
2015-01-28 13:16:50 +11:00
|
|
|
|
public override void Refresh(Guid id)
|
|
|
|
|
|
{
|
2016-01-07 19:27:59 +01:00
|
|
|
|
ClearAllIsolatedCacheByEntityType<PublicAccessEntry>();
|
2015-01-28 13:16:50 +11:00
|
|
|
|
base.Refresh(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void Refresh(int id)
|
|
|
|
|
|
{
|
2016-01-07 19:27:59 +01:00
|
|
|
|
ClearAllIsolatedCacheByEntityType<PublicAccessEntry>();
|
2015-01-28 13:16:50 +11:00
|
|
|
|
base.Refresh(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void RefreshAll()
|
2014-03-27 14:43:07 +11:00
|
|
|
|
{
|
2016-01-07 19:27:59 +01:00
|
|
|
|
ClearAllIsolatedCacheByEntityType<PublicAccessEntry>();
|
2015-01-28 13:16:50 +11:00
|
|
|
|
base.RefreshAll();
|
2014-03-27 14:43:07 +11:00
|
|
|
|
}
|
2014-03-27 14:28:45 +11:00
|
|
|
|
|
2015-01-28 13:16:50 +11:00
|
|
|
|
public override void Remove(int id)
|
2014-03-27 14:43:07 +11:00
|
|
|
|
{
|
2016-01-07 19:27:59 +01:00
|
|
|
|
ClearAllIsolatedCacheByEntityType<PublicAccessEntry>();
|
2015-01-28 13:16:50 +11:00
|
|
|
|
base.Remove(id);
|
2014-03-27 14:43:07 +11:00
|
|
|
|
}
|
2016-05-26 17:12:04 +02:00
|
|
|
|
|
|
|
|
|
|
#endregion
|
2014-03-27 14:43:07 +11:00
|
|
|
|
}
|
2017-07-20 11:21:28 +02:00
|
|
|
|
}
|