当前位置:网站首页>redis按照正则批量删除key
redis按照正则批量删除key
2022-08-11 04:00:00 【菜鸟是大神】
Redis是一个开源,高级的键值存储和一个适用的解决方案,用于构建高性能,可扩展的Web应用程序。
Redis有三个主要特点,使它优越于其它键值数据存储系统 :
1.Redis将其数据库完全保存在内存中,仅使用磁盘进行持久化。
2.与其它键值数据存储相比,Redis有一组相对丰富的数据类型。
3.Redis可以将数据复制到任意数量的从机中。
redis目前还不支持批量删除key的命令,但是我们有时需要删除符合某个规则的keys,有两种方式:
1.使用redis-cli keys "PRO*"获取到以PRO开始的键,然后使用redis-cli del删除这些键---过于繁琐,不推荐使用
2.使用redis-cli keys "PRO*" |xargs redis-cli del一次删除,及其方便而且不会遗漏
边栏推荐
- leetcode刷题第13天二叉树系列之《98 BST及其验证》
- Build Zabbix Kubernetes cluster monitoring platform
- uni-app - 获取汉字拼音首字母(根据中文获取拼音首字母)
- Introduction to c # a week of high-level programming c # - LINQ Day Four
- Is there any way for kingbaseES to not read the system view under sys_catalog by default?
- 直播软件搭建,流式布局,支持单选、多选等
- Interchangeability Measurements and Techniques - Calculation of Deviations and Tolerances, Drawing of Tolerance Charts, Selection of Fits and Tolerance Classes
- Pinduoduo store business license related issues
- The FTP error code list
- LeetCode刷题第10天字符串系列之《125回文串验证》
猜你喜欢

什么是机器强化学习?原理是什么?

DNS separation resolution and intelligent resolution

The last update time of the tables queried by the two nodes of the rac standby database is inconsistent

Echart地图的省级,以及所有地市级下载与使用

Is Redis old?Performance comparison between Redis and Dragonfly

UNI-APP_iphone bottom safe area

(转)JVM中那些区域会发生OOM?

【FPGA】day21-移动平均滤波器

console.log alternatives you didn't know about

机器学习怎么学?机器学习流程
随机推荐
机器学习怎么学?机器学习流程
STC8H开发(十五): GPIO驱动Ci24R1无线模块
The solution to the height collapse problem
直播平台开发,Flutter,Drawer侧滑
Pinduoduo store business license related issues
MySQL数据库存储引擎以及数据库的创建、修改与删除
set_new_handler(0)是什么意思?有什么用?
Detailed explanation of VIT source code
多串口RS485工业网关BL110
Build Zabbix Kubernetes cluster monitoring platform
Interchangeable Measurement Techniques - Geometric Errors
[FPGA] day19- binary to decimal (BCD code)
rub the heat - do not open
MYSQLg高级------回表
The "top pillar" slides, and new growth is extremely difficult to shoulder the heavy responsibility. Is Ali "squatting" to jump higher?
What kind of programming trading strategy types can be divided into?
常见布局效果实现方案
uni-app - city selection index list / city list sorted by A-Z (uview component library IndexList index list)
Qnet Weak Network Test Tool Operation Guide
typedef defines the structure array type