17 lines
523 B
C#
17 lines
523 B
C#
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Mirea.Api.Security.Common.Interfaces;
|
|
|
|
public interface ICacheService
|
|
{
|
|
Task SetAsync<T>(string key, T value,
|
|
TimeSpan? absoluteExpirationRelativeToNow = null,
|
|
TimeSpan? slidingExpiration = null,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
Task<T?> GetAsync<T>(string key, CancellationToken cancellationToken = default);
|
|
Task RemoveAsync(string key, CancellationToken cancellationToken = default);
|
|
}
|