Files
Umbraco-CMS/src/Umbraco.Core/Cache/ICacheRefresher.cs

34 lines
1.0 KiB
C#
Raw Normal View History

2018-06-29 19:52:40 +02:00
using System;
using Umbraco.Cms.Core.Composing;
2018-06-29 19:52:40 +02:00
namespace Umbraco.Cms.Core.Cache
2018-06-29 19:52:40 +02:00
{
/// <summary>
2019-01-22 18:03:39 -05:00
/// The IcacheRefresher Interface is used for load balancing.
2018-06-29 19:52:40 +02:00
///
/// </summary>
public interface ICacheRefresher : IDiscoverable
{
Guid RefresherUniqueId { get; }
string Name { get; }
void RefreshAll();
void Refresh(int id);
void Remove(int id);
void Refresh(Guid id);
}
/// <summary>
/// Strongly type cache refresher that is able to refresh cache of real instances of objects as well as IDs
/// </summary>
/// <typeparam name="T"></typeparam>
/// <remarks>
/// This is much better for performance when we're not running in a load balanced environment so we can refresh the cache
/// against a already resolved object instead of looking the object back up by id.
/// </remarks>
2019-05-20 18:28:35 +02:00
public interface ICacheRefresher<T> : ICacheRefresher
2018-06-29 19:52:40 +02:00
{
void Refresh(T instance);
void Remove(T instance);
}
}