♻️ Extract the Storage service to DysonNetwork.Drive microservice
This commit is contained in:
13
DysonNetwork.Drive/Services/ICacheService.cs
Normal file
13
DysonNetwork.Drive/Services/ICacheService.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DysonNetwork.Drive.Services;
|
||||
|
||||
public interface ICacheService
|
||||
{
|
||||
Task<T?> GetAsync<T>(string key);
|
||||
Task SetAsync<T>(string key, T value, System.TimeSpan? expiry = null);
|
||||
Task RemoveAsync(string key);
|
||||
Task<bool> ExistsAsync(string key);
|
||||
Task<long> IncrementAsync(string key, long value = 1);
|
||||
Task<long> DecrementAsync(string key, long value = 1);
|
||||
}
|
Reference in New Issue
Block a user