8
8
intl "github.com/redis/rueidis/internal/cmds"
9
9
)
10
10
11
- // MGetCache is a helper that consults the client-side caches with multiple keys by grouping keys within same slot into multiple GETs
11
+ // MGetCache is a helper that consults the client-side caches with multiple keys by grouping keys within the same slot into multiple GETs
12
12
func MGetCache (client Client , ctx context.Context , ttl time.Duration , keys []string ) (ret map [string ]RedisMessage , err error ) {
13
13
if len (keys ) == 0 {
14
14
return make (map [string ]RedisMessage ), nil
@@ -38,7 +38,7 @@ func isCacheDisabled(client Client) bool {
38
38
return false
39
39
}
40
40
41
- // MGet is a helper that consults the redis directly with multiple keys by grouping keys within same slot into MGET or multiple GETs
41
+ // MGet is a helper that consults the redis directly with multiple keys by grouping keys within the same slot into MGET or multiple GETs
42
42
func MGet (client Client , ctx context.Context , keys []string ) (ret map [string ]RedisMessage , err error ) {
43
43
if len (keys ) == 0 {
44
44
return make (map [string ]RedisMessage ), nil
@@ -57,7 +57,7 @@ func MGet(client Client, ctx context.Context, keys []string) (ret map[string]Red
57
57
return doMultiGet (client , ctx , cmds .s , keys )
58
58
}
59
59
60
- // MSet is a helper that consults the redis directly with multiple keys by grouping keys within same slot into MSETs or multiple SETs
60
+ // MSet is a helper that consults the redis directly with multiple keys by grouping keys within the same slot into MSETs or multiple SETs
61
61
func MSet (client Client , ctx context.Context , kvs map [string ]string ) map [string ]error {
62
62
if len (kvs ) == 0 {
63
63
return make (map [string ]error )
@@ -76,7 +76,7 @@ func MSet(client Client, ctx context.Context, kvs map[string]string) map[string]
76
76
return doMultiSet (client , ctx , cmds .s )
77
77
}
78
78
79
- // MDel is a helper that consults the redis directly with multiple keys by grouping keys within same slot into DELs
79
+ // MDel is a helper that consults the redis directly with multiple keys by grouping keys within the same slot into DELs
80
80
func MDel (client Client , ctx context.Context , keys []string ) map [string ]error {
81
81
if len (keys ) == 0 {
82
82
return make (map [string ]error )
@@ -95,7 +95,7 @@ func MDel(client Client, ctx context.Context, keys []string) map[string]error {
95
95
return doMultiSet (client , ctx , cmds .s )
96
96
}
97
97
98
- // MSetNX is a helper that consults the redis directly with multiple keys by grouping keys within same slot into MSETNXs or multiple SETNXs
98
+ // MSetNX is a helper that consults the redis directly with multiple keys by grouping keys within the same slot into MSETNXs or multiple SETNXs
99
99
func MSetNX (client Client , ctx context.Context , kvs map [string ]string ) map [string ]error {
100
100
if len (kvs ) == 0 {
101
101
return make (map [string ]error )
@@ -114,7 +114,7 @@ func MSetNX(client Client, ctx context.Context, kvs map[string]string) map[strin
114
114
return doMultiSet (client , ctx , cmds .s )
115
115
}
116
116
117
- // JsonMGetCache is a helper that consults the client-side caches with multiple keys by grouping keys within same slot into multiple JSON.GETs
117
+ // JsonMGetCache is a helper that consults the client-side caches with multiple keys by grouping keys within the same slot into multiple JSON.GETs
118
118
func JsonMGetCache (client Client , ctx context.Context , ttl time.Duration , keys []string , path string ) (ret map [string ]RedisMessage , err error ) {
119
119
if len (keys ) == 0 {
120
120
return make (map [string ]RedisMessage ), nil
@@ -127,7 +127,7 @@ func JsonMGetCache(client Client, ctx context.Context, ttl time.Duration, keys [
127
127
return doMultiCache (client , ctx , cmds .s , keys )
128
128
}
129
129
130
- // JsonMGet is a helper that consults redis directly with multiple keys by grouping keys within same slot into JSON.MGETs or multiple JSON.GETs
130
+ // JsonMGet is a helper that consults redis directly with multiple keys by grouping keys within the same slot into JSON.MGETs or multiple JSON.GETs
131
131
func JsonMGet (client Client , ctx context.Context , keys []string , path string ) (ret map [string ]RedisMessage , err error ) {
132
132
if len (keys ) == 0 {
133
133
return make (map [string ]RedisMessage ), nil
@@ -146,7 +146,7 @@ func JsonMGet(client Client, ctx context.Context, keys []string, path string) (r
146
146
return doMultiGet (client , ctx , cmds .s , keys )
147
147
}
148
148
149
- // JsonMSet is a helper that consults redis directly with multiple keys by grouping keys within same slot into JSON.MSETs or multiple JOSN.SETs
149
+ // JsonMSet is a helper that consults redis directly with multiple keys by grouping keys within the same slot into JSON.MSETs or multiple JOSN.SETs
150
150
func JsonMSet (client Client , ctx context.Context , kvs map [string ]string , path string ) map [string ]error {
151
151
if len (kvs ) == 0 {
152
152
return make (map [string ]error )
@@ -165,7 +165,7 @@ func JsonMSet(client Client, ctx context.Context, kvs map[string]string, path st
165
165
return doMultiSet (client , ctx , cmds .s )
166
166
}
167
167
168
- // DecodeSliceOfJSON is a helper that struct-scans each RedisMessage into dest, which must be a slice of pointer.
168
+ // DecodeSliceOfJSON is a helper that struct-scans each RedisMessage into dest, which must be a slice of the pointer.
169
169
func DecodeSliceOfJSON [T any ](result RedisResult , dest * []T ) error {
170
170
values , err := result .ToArray ()
171
171
if err != nil {
0 commit comments