11 lines
381 B
C#
11 lines
381 B
C#
namespace DramaLing.Api.Services.Infrastructure.Caching;
|
|
|
|
public interface ICacheProvider
|
|
{
|
|
Task<T?> GetAsync<T>(string key) where T : class;
|
|
Task<bool> SetAsync<T>(string key, T value, TimeSpan expiry) where T : class;
|
|
Task<bool> RemoveAsync(string key);
|
|
Task<bool> ExistsAsync(string key);
|
|
Task<bool> ClearAsync();
|
|
string ProviderName { get; }
|
|
} |