using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DS.Module.RedisModule { public interface IRedisService { /// /// 设置长时间存在的值 /// /// /// /// bool SetLongValue(string key, string value); /// /// 设置值,并设置清除时间 /// /// /// /// /// bool SetValue(string key, string value, int outSecond); /// /// 设置值,存在则覆盖,并沿用之前的清除时间 /// /// /// /// bool SetValue(string key, string value); /// /// 是否存在key /// /// /// bool Exists(string key); // /// 更新Key,把自动注销时间设置为原来的key的时间,不存在返回false /// /// /// /// bool UpdateValue(string key, string value); /// /// 获取值 /// /// /// string? GetValue(string key); /// /// 获得json序列化后的 /// /// /// /// T? GetValue(string key); /// /// 获取值 /// /// /// /// T? GetEntity(string key); /// /// 获取列表 模糊匹配 /// /// /// /// List? GetLike(string key); /// /// 删除 /// /// void DeleteKey(string key); /// /// 模糊删除 /// /// void DeleteLike(string key); /// /// 释放Redis链接 /// void Dispose(); } }