Redis获取数采数据
This commit is contained in:
@@ -224,12 +224,20 @@ public class RedisCache : ICache, ISingleton
|
||||
long second = RedisHelper.PTtl(key);
|
||||
return DateTime.Now.AddMilliseconds(second);
|
||||
}
|
||||
public string GetHash(string key, string field)
|
||||
public Task<string> GetHash(string key, string field)
|
||||
{
|
||||
return RedisHelper.HGet(key, field);
|
||||
return RedisHelper.HGetAsync(key, field);
|
||||
}
|
||||
public bool HashExist(string key, string field)
|
||||
public Task<bool> HashExist(string key, string field)
|
||||
{
|
||||
return RedisHelper.HExists(key, field);
|
||||
return RedisHelper.HExistsAsync(key, field);
|
||||
}
|
||||
public Task<Dictionary<string, string>> HGetAll(string key)
|
||||
{
|
||||
return RedisHelper.HGetAllAsync(key);
|
||||
}
|
||||
public Task<bool> HSet(string key, string field, string value)
|
||||
{
|
||||
return RedisHelper.HSetAsync(key, field,value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user