首页
Profile
Profile
Profile
Profile
Profile

Redis 批量删除脚本

2015-10-24 阅读 284
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日
 
陕ICP备13008705号-1 Chat Gpt Api