VEU.WathBody/3-app/1-lib/Kit.Helpers/Service/IDistributedCacheService.cs

14 lines
490 B
C#

namespace Kit.Helpers;
public class DistributedCacheOptions
{
public TimeSpan? AbsoluteExpirationRelativeToNow { get; set; }
public TimeSpan? SlidingExpiration { get; set; }
}
/// <summary>Интерфейс сервиса распеределённого кэша</summary>
public interface IDistributedCacheService
{
void SetCacheData<TObject>(string cacheName, TObject data, DistributedCacheOptions setProperties);
TResult? GetCacheData<TResult>(string cacheName);
}