CreateGroup

This commit is contained in:
withchao
2023-01-06 16:19:57 +08:00
parent 90cc7937e6
commit 90fddd34d2
3 changed files with 100 additions and 98 deletions
+12
View File
@@ -205,6 +205,18 @@ func GetUserInfoFromCache(userID string) (*imdb.User, error) {
return userInfo, utils.Wrap(err, "")
}
func GetUserInfoFromCacheBatch(userIDs []string) ([]*imdb.User, error) {
var users []*imdb.User
for _, userID := range userIDs {
user, err := GetUserInfoFromCache(userID)
if err != nil {
return nil, err
}
users = append(users, user)
}
return users, nil
}
func DelUserInfoFromCache(userID string) error {
return db.DB.Rc.TagAsDeleted(userInfoCache + userID)
}