查询所有的keys keys teacher_sso_username* 查询key的TTL ttl teacher_sso_username:13444444416 批量修改key的TTL时间 编写脚本expireAll.sh redis-cli -h 127.0.0.1 -p 6379 -a Cg44uwsgsgsg1 expire $1 1296000 执行命令 redis-cli -h 127.0.0.1 -p 6379 -a Cg44uwsgsgsg1 keys "support_sso_userinfo*" | xargs -I {} ./expireAll.sh {} 脚本内容: #!/bin/bash redis-cli -h 127.0.0.1 -p 6379 -a Cg44uh6I96f0RPb1 expire $1 554715 第二种(批量删除缓存): redis-cli -h 127.0.0.1 -p 6379 -a Cg44uh6I96f0RPb1 keys "student_sso_username*" | xargs redis-cli -h 127...... redis批量修改查询key redis