1.批量删除key

redis-cli -h 127.0.0.1 -p 6379 -n 2 -a sdongpo123 keys '*form_id*' | xargs redis-cli -h 127.0.0.1  -p 6379 -a sdongpo123 -n 2 del

2.批量修改key的过期时间:

redis-cli -h 127.0.0.1 keys "pre:key_*" | xargs -i redis-cli -h 127.0.0.1 expire {} 86400

相关文章:

  • 2021-12-27
  • 2021-09-16
  • 2021-10-26
  • 2019-12-25
  • 2021-08-01
猜你喜欢
  • 2021-12-18
  • 2022-01-07
  • 2020-04-15
  • 2022-01-22
  • 2021-08-28
  • 2021-08-07
相关资源
相似解决方案