e97a01c75c
servers when it is changed/removed. Removes RemoveByJson as we only actually require RefreshByJson since we can put any sort of parameters in a custom json string including whether it is a remove operation (if required)
20 lines
786 B
C#
20 lines
786 B
C#
using Umbraco.Core.Sync;
|
|
using umbraco.interfaces;
|
|
|
|
namespace Umbraco.Core.Cache
|
|
{
|
|
/// <summary>
|
|
/// A base class for json cache refreshers that ensures the correct events are raised when
|
|
/// cache refreshing occurs.
|
|
/// </summary>
|
|
/// <typeparam name="TInstanceType">The real cache refresher type, this is used for raising strongly typed events</typeparam>
|
|
public abstract class JsonCacheRefresherBase<TInstanceType> : CacheRefresherBase<TInstanceType>, IJsonCacheRefresher
|
|
where TInstanceType : ICacheRefresher
|
|
{
|
|
|
|
public virtual void Refresh(string jsonPayload)
|
|
{
|
|
OnCacheUpdated(Instance, new CacheRefresherEventArgs(jsonPayload, MessageType.RefreshByJson));
|
|
}
|
|
}
|
|
} |