feat: local cache

This commit is contained in:
withchao 2024-01-15 17:08:02 +08:00
parent 656bfef069
commit 6e1f96a720

View File

@ -17,6 +17,7 @@ package cache
import ( import (
"context" "context"
"errors" "errors"
"github.com/dtm-labs/rockscache"
"strconv" "strconv"
"time" "time"
@ -128,7 +129,8 @@ type MsgModel interface {
} }
func NewMsgCacheModel(client redis.UniversalClient) MsgModel { 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 { type msgCache struct {