mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-12 13:05:58 +08:00
localcache
This commit is contained in:
@@ -16,6 +16,7 @@ package friend
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
|
||||
"github.com/OpenIMSDK/tools/tx"
|
||||
|
||||
@@ -54,6 +55,11 @@ type friendServer struct {
|
||||
}
|
||||
|
||||
func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error {
|
||||
|
||||
config.Config.LocalCache.Friend.Topic = "friend"
|
||||
config.Config.LocalCache.Friend.SlotNum = 500
|
||||
config.Config.LocalCache.Friend.SlotSize = 20000
|
||||
|
||||
// Initialize MongoDB
|
||||
mongo, err := unrelation.NewMongo()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user