[feature] 添加Redis 相关服务 未应用到python

This commit is contained in:
lichx
2024-11-03 21:58:05 +08:00
parent bacea33214
commit e084b2584b
10 changed files with 210 additions and 11 deletions
@@ -0,0 +1,12 @@
namespace SiteManagementSystem_SoftwareEngineering_.Interface
{
public interface ICacheService<TCategoryName>
{
public Action<string>? ExpiredCallbackFunc { set; }
public int Capacity { get; set; }
public Task<bool> SetAsync(string key, string value, TimeSpan? expiry = null);
public Task<string?> GetAsync(string key);
public Task<bool> RemoveAsync(string key);
public Task<bool> RemoveLatestKeyAsync();
}
}