From a5b4666013fd5617143c8918303df99d09a64068 Mon Sep 17 00:00:00 2001 From: Akshay Khairmode Date: Tue, 10 Feb 2026 23:52:20 +0530 Subject: [PATCH] add Client method to compat and interface --- rueidiscompat/adapter.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rueidiscompat/adapter.go b/rueidiscompat/adapter.go index 3b3cff55..1b7c9e09 100644 --- a/rueidiscompat/adapter.go +++ b/rueidiscompat/adapter.go @@ -60,6 +60,8 @@ type Cmdable interface { SSubscribe(ctx context.Context, channels ...string) PubSub Watch(ctx context.Context, fn func(Tx) error, keys ...string) error + + Client() rueidis.Client } type CoreCmdable interface { @@ -662,6 +664,10 @@ func NewAdapter(client rueidis.Client, options ...AdapterOption) Cmdable { return c } +func (c *Compat) Client() rueidis.Client { + return c.client +} + func (c *Compat) Cache(ttl time.Duration) CacheCompat { return CacheCompat{client: c.client, ttl: ttl} }