mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-10-26 21:22:16 +08:00 
			
		
		
		
	1
This commit is contained in:
		
							parent
							
								
									e4d1c7712c
								
							
						
					
					
						commit
						75cf56b6d4
					
				
							
								
								
									
										3
									
								
								pkg/common/storage/cache/redis/online.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								pkg/common/storage/cache/redis/online.go
									
									
									
									
										vendored
									
									
								
							| @ -7,6 +7,7 @@ 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" | ||||||
| @ -17,7 +18,7 @@ import ( | |||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func NewUserOnline(rdb redis.UniversalClient) cache.OnlineCache { | func NewUserOnline(rdb redis.UniversalClient) cache.OnlineCache { | ||||||
| 	if rdb == nil { | 	if rdb == nil || config.Standalone() { | ||||||
| 		return mcache.NewOnlineCache() | 		return mcache.NewOnlineCache() | ||||||
| 	} | 	} | ||||||
| 	return &userOnline{ | 	return &userOnline{ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user