fix(#IW2AQ, #IW296): 个人中心修复缓存不更新
#Comment User实体类保存数据后缓存项错误导致缓存未清除 comment #IW2AQ #IW296 #Issue close https://gitee.com/LongbowEnterprise/dashboard/issues?id=IW2AQ close https://gitee.com/LongbowEnterprise/dashboard/issues?id=IW296
This commit is contained in:
parent
911d55f229
commit
e6b61ee165
|
@ -87,7 +87,7 @@ namespace Bootstrap.DataAccess
|
|||
public static bool SaveApp(string userName, string app)
|
||||
{
|
||||
var ret = DbContextManager.Create<User>().SaveApp(userName, app);
|
||||
if (ret) CacheCleanUtility.ClearCache(cacheKey: $"{RetrieveUsersDataKey}*");
|
||||
if (ret) CacheCleanUtility.ClearCache(cacheKey: $"{RetrieveUsersByNameDataKey}*");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ namespace Bootstrap.DataAccess
|
|||
{
|
||||
if (!UserChecker(new User { UserName = userName, DisplayName = displayName })) return false;
|
||||
var ret = DbContextManager.Create<User>().SaveDisplayName(userName, displayName);
|
||||
if (ret) CacheCleanUtility.ClearCache(cacheKey: $"{RetrieveUsersDataKey}*");
|
||||
if (ret) CacheCleanUtility.ClearCache(cacheKey: $"{RetrieveUsersByNameDataKey}*");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue