14 lines
490 B
C#
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);
|
|
} |