2024-05-29 04:29:50 +03:00
|
|
|
|
using System;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Mirea.Api.Security.Common.Interfaces;
|
|
|
|
|
|
|
|
|
|
public interface ICacheService
|
|
|
|
|
{
|
2024-05-29 05:30:00 +03:00
|
|
|
|
Task SetAsync<T>(string key, T value,
|
|
|
|
|
TimeSpan? absoluteExpirationRelativeToNow = null,
|
|
|
|
|
TimeSpan? slidingExpiration = null,
|
|
|
|
|
CancellationToken cancellationToken = default);
|
|
|
|
|
|
2024-05-29 04:29:50 +03:00
|
|
|
|
Task<T?> GetAsync<T>(string key, CancellationToken cancellationToken = default);
|
|
|
|
|
Task RemoveAsync(string key, CancellationToken cancellationToken = default);
|
|
|
|
|
}
|