当前位置:网站首页>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一次删除,及其方便而且不会遗漏
边栏推荐
- typedef defines the structure array type
- Design and Realization of Employment Management System in Colleges and Universities
- 机器学习可以应用在哪些场景?机器学习有什么用?
- (转)JVM中那些区域会发生OOM?
- AVH 动手实践 (二) | 在 Arm 虚拟硬件上部署 PP-OCR 模型
- The FTP error code list
- When EasyCVR is connected to the GB28181 device, what is the reason that the device is connected normally but the video cannot be played?
- [FPGA] Design Ideas - I2C Protocol
- [Likou] 22. Bracket generation
- The development of the massage chair control panel makes the massage chair simple and intelligent
猜你喜欢
"239 Sliding Window Maximum Value" on the 16th day of LeetCode brushing
LeetCode刷题第10天字符串系列之《125回文串验证》
What should I do if the channel ServerID is incorrect when EasyCVR is connected to a Hikvision Dahua device and selects another cluster server?
WPF DataGrid 使用数据模板(2)
es-head插件插入查询以及条件查询(五)
【FPGA】abbreviation
【FPGA】day22-SPI protocol loopback
Qnet Weak Network Test Tool Operation Guide
Read the article, high-performance and predictable data center network
洛谷P2150 寿司晚宴
随机推荐
Provincial level of Echart maps, as well as all prefecture-level download and use
"125 Palindrome Verification" of the 10th day string series of LeetCode brushing questions
直播软件搭建,流式布局,支持单选、多选等
[yu gong series] Go program 035-08 2022 interfaces and inheritance and transformation and empty interface
Will oracle cardinality affect query speed?
"98 BST and Its Verification" of the 13th day of leetcode brushing series of binary tree series
每日一题-滑动窗口
.NET service registration
Graphical LeetCode - 640. Solving Equations (Difficulty: Moderate)
使用百度EasyDL实现智能垃圾箱
Clang Code Model: Error: The clangbackend executable “X:/clangbackend.exe“ could not be started
如何进行AI业务诊断,快速识别降本提效增长点?
js 将字符串作为js执行代码使用
Build Zabbix Kubernetes cluster monitoring platform
uni-app - 获取汉字拼音首字母(根据中文获取拼音首字母)
The custom of the C language types -- -- -- -- -- - structure
【FPGA】day18-ds18b20实现温度采集
leetCode刷题14天二叉树系列之《 110 平衡二叉树判断》
Design and Realization of Employment Management System in Colleges and Universities
快速使用UE4制作”大场景游戏“