using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DocumentServiceAPI.Services.IService { /// /// 缓存服务 /// 目前只写了对redis的支持 ,如需要其他的,自行完善 该接口为按标准服务注入,在注入时判决了对redis的配置。如果没有偶配置,者不注入服务 /// public interface IRedisCacheService { /// /// 设置一个键值 /// /// /// /// /// /// bool Add(string key, T value, int expireSeconds); /// /// 获取一个键值 /// /// /// /// T? Get(string key); /// /// 获取键值剩余过时间 秒级 /// /// /// public long GetTtl(string key); } }