|
|
@ -7,7 +7,6 @@ import (
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
|
|
|
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache/cachekey"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache/cachekey"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache/mcache"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache/mcache"
|
|
|
@ -18,7 +17,10 @@ import (
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func NewUserOnline(rdb redis.UniversalClient) cache.OnlineCache {
|
|
|
|
func NewUserOnline(rdb redis.UniversalClient) cache.OnlineCache {
|
|
|
|
if rdb == nil || config.Standalone() {
|
|
|
|
//if rdb == nil || config.Standalone() {
|
|
|
|
|
|
|
|
// return mcache.NewOnlineCache()
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
if rdb == nil {
|
|
|
|
return mcache.NewOnlineCache()
|
|
|
|
return mcache.NewOnlineCache()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return &userOnline{
|
|
|
|
return &userOnline{
|
|
|
|