feat: cache batch

This commit is contained in:
icey-yu
2024-09-05 14:35:40 +08:00
parent 176eb00941
commit 7f8d26c36b
3 changed files with 32 additions and 14 deletions
+9
View File
@@ -77,6 +77,15 @@ func (o *OnlineCache) GetUserOnline(ctx context.Context, userID string) (bool, e
return len(platformIDs) > 0, nil
}
func (o *OnlineCache) GetUsersOnline(ctx context.Context, usersID []string) ([]string, []string, error) {
var (
onlineUserIDS []string
offlineUserIDs []string
)
return onlineUserIDS, offlineUserIDs, nil
}
//func (o *OnlineCache) GetUsersOnline(ctx context.Context, userIDs []string) ([]string, error) {
// onlineUserIDs := make([]string, 0, len(userIDs))
// for _, userID := range userIDs {