从redis缓存读取配置数据

zw
smartwyy 6 months ago
parent cab1c3131b
commit 76006f54e9

@ -171,6 +171,12 @@ namespace Service.System
throw new ArgumentException("配置数据key格式错误"); throw new ArgumentException("配置数据key格式错误");
} }
string? strValue = redisHelper.GetStrValue(key);
if (strValue != null)
{
return strValue;
}
if (Dictionary.TryGetValue(key, out string? value)) if (Dictionary.TryGetValue(key, out string? value))
{ {
return value; return value;

Loading…
Cancel
Save