redis 2.10.6
redis-py-cluster 1.3.6
简单实用:
startup_nodes = [
{"host": "ip", "port": port},
{"host": "ip", "port": port}
]
# 连接集群
conn = StrictRedisCluster(startup_nodes=startup_nodes, decode_responses=True)
下面和redis 库操作一致
conn.hset(XXX)
redis 2.10.6
redis-py-cluster 1.3.6
简单实用:
startup_nodes = [
{"host": "ip", "port": port},
{"host": "ip", "port": port}
]
# 连接集群
conn = StrictRedisCluster(startup_nodes=startup_nodes, decode_responses=True)
下面和redis 库操作一致
conn.hset(XXX)