fix(user):补充清理用户部分的缓存。
This commit is contained in:
parent
28b1478e9a
commit
62560e4eeb
|
@ -48,7 +48,7 @@ func (ur _UserRepository) FindUserByUsername(username string) (*model.User, erro
|
|||
ur.log.Error("从数据库查询指定用户名的用户基本信息失败。", zap.String("username", username), zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
cache.CacheEntity(user, []string{"user", fmt.Sprintf("user:%s", username)}, "user", username)
|
||||
cache.CacheEntity(user, []string{"user", fmt.Sprintf("user:%s", username), fmt.Sprintf("user:%s", user.Id)}, "user", username)
|
||||
return &user, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user