Redis 批量删除脚本
redis存了不少数据,想考虑怎么找个办法能批量删除某些cache,写了个简单的脚本。
Data store in redis, just want to delete some of these. Make a bash shell to do this.
```
#!/bin/bash
redis-cli keys "$1*" | while read line
do
echo $line
redis-cli del "$line"
done
```
Run
```
redis-del some
```
redis
更新于 2023年03月28日 20:53:55