Skip to content

Commit 987c942

Browse files
committed
add cacheable
1 parent b398793 commit 987c942

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rueidiscompat/adapter.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,12 @@ func (c *Compat) HStrLen(ctx context.Context, key string, field string) *IntCmd
15671567
return newIntCmd(resp)
15681568
}
15691569

1570+
func (c CacheCompat) HStrLen(ctx context.Context, key, field string) *IntCmd {
1571+
cmd := c.client.B().Hstrlen().Key(key).Field(field).Cache()
1572+
resp := c.client.DoCache(ctx, cmd, c.ttl)
1573+
return newIntCmd(resp)
1574+
}
1575+
15701576
func (c *Compat) HGetDel(ctx context.Context, key string, fields ...string) *StringSliceCmd {
15711577
cmd := c.client.B().Hgetdel().Key(key).Fields().Numfields(int64(len(fields))).Field(fields...).Build()
15721578
resp := c.client.Do(ctx, cmd)

0 commit comments

Comments
 (0)