mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-22 13:09:52 +08:00
feat: local cache
This commit is contained in:
parent
656bfef069
commit
6e1f96a720
4
pkg/common/db/cache/msg.go
vendored
4
pkg/common/db/cache/msg.go
vendored
@ -17,6 +17,7 @@ package cache
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"github.com/dtm-labs/rockscache"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@ -128,7 +129,8 @@ type MsgModel interface {
|
||||
}
|
||||
|
||||
func NewMsgCacheModel(client redis.UniversalClient) MsgModel {
|
||||
return &msgCache{rdb: client}
|
||||
rcClient := rockscache.NewClient(client, rockscache.NewDefaultOptions())
|
||||
return &msgCache{metaCache: NewMetaCacheRedis(rcClient), rdb: client}
|
||||
}
|
||||
|
||||
type msgCache struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user