替换 localhost 为 127.0.0.1,避免 DNS 解析影响响应速度
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import redis
|
||||
|
||||
redis_client = redis.Redis(host="localhost", port=6379, db=0)
|
||||
redis_client = redis.Redis(host="127.0.0.1", port=6379, db=0)
|
||||
matched_keys = redis_client.keys(f"**")
|
||||
redis_client.delete(*matched_keys)
|
||||
|
||||
Reference in New Issue
Block a user