redis批量删除前缀的key
时间: 2023-09-27 09:08:26 浏览: 159
Redis批量删除KEY的方法
Sure! To delete keys with a certain prefix in Redis, you can use the `KEYS` command to find all the keys matching your prefix, and then use the `DEL` command to delete them. Here's an example:
```
redis-cli KEYS "prefix:*" | xargs redis-cli DEL
```
This will delete all keys that start with "prefix:".
阅读全文