Skip to content

一个Redis的批量删除脚本,使用scan和异步删除

License

Notifications You must be signed in to change notification settings

CV-Devlau/redis_batch_del_script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

redis_batch_del_script

一个Redis的批量删除脚本,使用scan和异步删除

使用方式

[root@localhost tool]# sh redis_batch_del_script.sh 
请输入键名表达式或指定key,例如:cache:*,cache:1 
输入键名表达式 > cache*
Are You Sure? match: cache*  [Y/n] y
删除的key个数为: 6

键名表达式可以为具体的key或者所有scan支持的表达式

About

一个Redis的批量删除脚本,使用scan和异步删除

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages