mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
del key
This commit is contained in:
parent
15ef064fc3
commit
99ec0ed8df
6
internal/rpc/cache/cache.go
vendored
6
internal/rpc/cache/cache.go
vendored
@ -3,16 +3,17 @@ package cache
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/db/rocks_cache"
|
||||
rocksCache "Open_IM/pkg/common/db/rocks_cache"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
pbCache "Open_IM/pkg/proto/cache"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"google.golang.org/grpc"
|
||||
"net"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type cacheServer struct {
|
||||
@ -67,6 +68,7 @@ func (s *cacheServer) Run() {
|
||||
log.NewError("0", "RegisterEtcd failed ", err.Error())
|
||||
panic(utils.Wrap(err, "register cache module rpc to etcd err"))
|
||||
}
|
||||
go rocksCache.DelKeys()
|
||||
err = srv.Serve(listener)
|
||||
if err != nil {
|
||||
log.NewError("0", "Serve failed ", err.Error())
|
||||
|
@ -36,7 +36,7 @@ const (
|
||||
conversationIDListCache = "CONVERSATION_ID_LIST_CACHE:"
|
||||
)
|
||||
|
||||
func init() {
|
||||
func DelKeys() {
|
||||
fmt.Println("init to del old keys")
|
||||
for _, key := range []string{groupCache, friendRelationCache, blackListCache, userInfoCache, groupInfoCache, groupOwnerIDCache, joinedGroupListCache,
|
||||
groupMemberInfoCache, groupAllMemberInfoCache, allFriendInfoCache} {
|
||||
|
Loading…
x
Reference in New Issue
Block a user