当前位置:网站首页>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一次删除,及其方便而且不会遗漏
边栏推荐
- Qnet Weak Network Test Tool Operation Guide
- 如何进行AI业务诊断,快速识别降本提效增长点?
- [C Language] Getting Started
- Basic understanding of MongoDB (2)
- Get the length of the linked list
- "110 Balanced Binary Tree Judgment" in leetCode's 14-day binary tree series
- What is third-party payment?
- 【深度学习】基于卷积神经网络的天气识别训练
- uni-app - 获取汉字拼音首字母(根据中文获取拼音首字母)
- "104 Maximum Depth of Binary Trees" in LeetCode's Day 12 Binary Tree Series
猜你喜欢
【FPGA】SDRAM
LeetCode刷题第11天字符串系列之《 58最后一个单词长度》
UNI-APP_iphone bottom safe area
【FPGA】day19-二进制转换为十进制(BCD码)
A simple JVM tuning, learn to write it on your resume
Day20 FPGA 】 【 - block the I2C read and write EEPROM
【FPGA】设计思路——I2C协议
[FPGA] day19- binary to decimal (BCD code)
【FPGA】day21-移动平均滤波器
【FPGA】day21- moving average filter
随机推荐
【力扣】22.括号生成
[Likou] 22. Bracket generation
A brief analysis of whether programmatic futures trading or manual order is better?
[yu gong series] Go program 035-08 2022 interfaces and inheritance and transformation and empty interface
How to learn machine learning?machine learning process
What is machine learning?Explain machine learning concepts in detail
Audio codec, using FAAC to implement AAC encoding
The solution to the height collapse problem
Introduction to c # a week of high-level programming c # - LINQ Day Four
LeetCode Brush Questions Day 11 String Series "58 Last Word Length"
【ADI低功耗2k代码】基于ADuCM4050的ADXL363、TMP75的加速度、温度检测及串口打印、蜂鸣器播放音乐(孤勇者)
Is there any way for kingbaseES to not read the system view under sys_catalog by default?
【FPGA】名词缩写
【C语言】入门
STC8H开发(十五): GPIO驱动Ci24R1无线模块
Which one to choose for mobile map development?
Get Qt installation information: including installation directory and various macro addresses
What kind of programming trading strategy types can be divided into?
Build Zabbix Kubernetes cluster monitoring platform
The impact of programmatic trading and subjective trading on the profit curve!