当前位置:网站首页>Redis(二)—Redis通用命令
Redis(二)—Redis通用命令
2022-07-07 01:41:00 【yutao_517】
Redis通用命令
KEYS:查看符合模板的所以key,不介意在生产环境设备上使用。
通过help[command]可以查看一个命令的具体用法。例如
SET插入字符串类型的键值对
MSET 插入多个字符串类型的键值对
DEL删除指定的KEY
EXISTS判断KEY是否存在
EXPIRE给一个KEY设置有效期。有效期到期时,KEY自动删除
TTL查看一个KEY的剩余有效期
ttl返回值
大于等于0的整数:键剩余的过期时间
-1:没设置过期时间
-2:键不存在
DBSIZE键总数
TYPE键的数据结构类型
GET根据key获取string类型的value
INCR让一个整型的key自增1
INCRBY让一个整型的key自增指定的步长
INCRBYFLOAT让一个浮点型的key自增指定的步长
INCRBYFLOAT让一个浮点型的key自增指定的步长
SETNX:添加一个String类型的键值对,前提是这个key不存在,否则不执行。
SETEX:添加一个String类型的键值对,并指定有效期。
边栏推荐
- 当我们谈论不可变基础设施时,我们在谈论什么
- 【FPGA教程案例14】基于vivado核的FIR滤波器设计与实现
- @Detailed differences between pathvariable and @requestparam
- Cf:c. column swapping [sort + simulate]
- C语言整理(待更新)
- SubGHz, LoRaWAN, NB-IoT, 物联网
- New Year Fireworks code plus copy, are you sure you don't want to have a look
- JVM monitoring and diagnostic tools - command line
- How to keep accounts of expenses in life
- Deep clustering: joint optimization of depth representation learning and clustering
猜你喜欢
VMware安装后打开就蓝屏
DC-7靶机
How to set up in touch designer 2022 to solve the problem that leap motion is not recognized?
Jstat of JVM command: View JVM statistics
On the discrimination of "fake death" state of STC single chip microcomputer
【GNN】图解GNN: A gentle introduction(含视频)
@pathvariable 和 @Requestparam的详细区别
CloudCompare-点对选取
Understand the deserialization principle of fastjson for generics
Detailed explanation of platform device driver architecture in driver development
随机推荐
【GNN】图解GNN: A gentle introduction(含视频)
From "running distractor" to data platform, Master Lu started the road of evolution
When we talk about immutable infrastructure, what are we talking about
Experience sharing of contribution of "management world"
Implementation of VGA protocol based on FPGA
Swagger3 configuration
「解析」FocalLoss 解决数据不平衡问题
改变ui组件原有样式
Open the blue screen after VMware installation
对称的二叉树【树的遍历】
postgresql 数据库 timescaledb 函数time_bucket_gapfill()报错解决及更换 license
C note 13
雷特智能家居龙海祁:从专业调光到全宅智能,20年专注成就专业
Deep clustering: joint optimization of depth representation learning and clustering
Jstat of JVM command: View JVM statistics
Personal imitation SSM framework
谷歌 Chrome 浏览器发布 103.0.5060.114 补丁修复 0-day 漏洞
直击2022ECDC萤石云开发者大会:携手千百行业加速智能升级
JMeter function assistant - random value, random string, fixed value random extraction
JMeter's own functions are not enough? Why don't you develop one yourself