update: cache add raw client api

This commit is contained in:
zhaoyupeng 2025-06-23 15:29:23 +08:00
parent 0e53ccc70c
commit 6d1024f951
2 changed files with 7 additions and 0 deletions

View File

@ -52,6 +52,9 @@ type Cache interface {
GetDel(ctx context.Context, key string) ([]byte, error)
GetDelScan(ctx context.Context, key string) Scanner
Close()
// Client return raw client
// !!! dangerous api
Client() any
}
var (

View File

@ -18,6 +18,10 @@ type _redis struct {
client *redis.Client
}
func (r *_redis) Client() any {
return r.client
}
func newRedis(ctx context.Context, client *redis.Client) *_redis {
r := &_redis{ctx: ctx, client: client}