2013-03-21 22:53:58 +06:00
|
|
|
|
using Umbraco.Core.Sync;
|
|
|
|
|
|
using umbraco.interfaces;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Cache
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2015-04-08 14:21:58 +02:00
|
|
|
|
/// Provides a base class for "json" cache refreshers.
|
2013-03-21 22:53:58 +06:00
|
|
|
|
/// </summary>
|
2015-04-08 14:21:58 +02:00
|
|
|
|
/// <typeparam name="TInstance">The actual cache refresher type.</typeparam>
|
|
|
|
|
|
/// <remarks>Ensures that the correct events are raised when cache refreshing occurs.</remarks>
|
|
|
|
|
|
public abstract class JsonCacheRefresherBase<TInstance> : CacheRefresherBase<TInstance>, IJsonCacheRefresher
|
|
|
|
|
|
where TInstance : ICacheRefresher
|
2013-03-21 22:53:58 +06:00
|
|
|
|
{
|
2015-04-08 14:21:58 +02:00
|
|
|
|
public virtual void Refresh(string json)
|
2013-03-21 22:53:58 +06:00
|
|
|
|
{
|
2015-04-08 14:21:58 +02:00
|
|
|
|
OnCacheUpdated(Instance, new CacheRefresherEventArgs(json, MessageType.RefreshByJson));
|
2013-03-21 22:53:58 +06:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|