Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.

Commit 6358cf3

Browse files
committed
using set for read_commands, thus make the lookup becomes O(1)
1 parent 55d8de2 commit 6358cf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rediscluster/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class RedisCluster(Redis):
172172

173173
# Not complete, but covers the major ones
174174
# https://redis.io/commands
175-
READ_COMMANDS = [
175+
READ_COMMANDS = set([
176176
"BITCOUNT",
177177
"BITPOS",
178178
"EXISTS",
@@ -212,7 +212,7 @@ class RedisCluster(Redis):
212212
"ZCOUNT",
213213
"ZRANGE",
214214
"ZSCORE"
215-
]
215+
])
216216

217217
RESULT_CALLBACKS = dict_merge(
218218
string_keys_to_dict([

0 commit comments

Comments
 (0)