【发布时间】:2022-02-04 17:40:31
【问题描述】:
我有一个包含 2 种记录类型的 Redis 多集群:
4_123: 123
// and
123: 4_123
我已通过 KEY 删除了与 4_* 匹配的记录:
redis-cli --scan --pattern 4_* | xargs -n 1 redis-cli DEL
还有一个精确集群的地址参数,这就是为什么我使用xargs -n 1 ... 来避免错误的集群错误。
现在我的问题是如何删除 VALUE 与相同模式匹配的记录:'4_*'?
【问题讨论】:
标签: redis xargs redis-cluster