mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-09 03:25:59 +08:00
feat: local cache
This commit is contained in:
@@ -11,14 +11,17 @@ import (
|
||||
|
||||
func NewGroupLocalCache(client rpcclient.GroupRpcClient, cli redis.UniversalClient) *GroupLocalCache {
|
||||
return &GroupLocalCache{
|
||||
local: localcache.New[any](localcache.WithRedisDeleteSubscribe(config.Config.LocalCache.Group.Topic, cli)),
|
||||
client: client,
|
||||
local: localcache.New[any](
|
||||
localcache.WithLocalSlotNum(config.Config.LocalCache.Group.SlotNum),
|
||||
localcache.WithLocalSlotSize(config.Config.LocalCache.Group.SlotSize),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
type GroupLocalCache struct {
|
||||
local localcache.Cache[any]
|
||||
client rpcclient.GroupRpcClient
|
||||
local localcache.Cache[any]
|
||||
}
|
||||
|
||||
func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) ([]string, error) {
|
||||
|
||||
Reference in New Issue
Block a user