redis模糊删除key

直接上代码

redis-cli --scan --pattern "mycache_id_*" | xargs -t redis-cli -n 0 del

参考:https://www.runoob.com/linux/linux-comm-xargs.html