当前位置:网站首页>Redis common commands
Redis common commands
2022-06-22 10:55:00 【dhjywe】
1. Basic operation of string
# Writing data
set key values
set name Tom
# Set multiple keys
mset x 1 y 2 z 3
mget x y z
# Do not modify duplicate keys
setnx name top
In this way, no one else can modify it
# Set the validity period of the key
setex key time value( Grammar format )
ep:setex name 10 wei( Set up 10s Time validity )
# Get the length of the key value string
strlen name
# Set new key to get old value
> GETSET db mongo
> nil # No old value returned nil
> get db
> mongo
> GETSET db redis
> mongo # Return old value
> get db
> redis
2. Numeric type operation
set count 90
incr count ## Self increasing 1
decr count ## Self reduction 1
incrby count 10 ## Self increasing 10
边栏推荐
- 推薦一款M1芯片電腦快速搭建集群的虛擬機軟件
- 【毕业季·进击的技术er】青春不散场
- Force buckle 1108 IP address invalidation
- ONES 出席首届「精益软件工程大会」,分享效能改进实践
- 线程常用调度方法
- Detailed explanation of rules and ideas for advance sale of deposit
- Recommander un logiciel de machine virtuelle pour la construction rapide d'un Cluster d'ordinateurs à puce M1
- 学会用VisualStudio开发人员工具查看对象模型
- Spark streamlined interview
- 7-1 框架发布 - 通过npm发布框架
猜你喜欢

在 Laravel 中使用计算列

In 2022, IPv6 deployment and application will be further promoted. How can we comprehensively realize security upgrading and transformation?

Thinkphp3.2.3 log inclusion analysis

中坚力量!优炫软件入选2022年中国数字安全百强

外贸专题:外贸邮件营销模板

普乐蛙5d飞行影院5d动感影院体验馆设备7d多人互动影院

2022-06-09 work record --yarn/npm-error-eperm: operation not permitted, UV_ cwd

Spark精简面试

HMS Core新闻行业解决方案:让技术加上人文的温度

php 数据库 mysql提问
随机推荐
Vs2022 connecting to SQLSERVER database tutorial
[graduation season · advanced technology Er] youth never ends
外贸专题:外贸邮件营销模板
LeetCode Algorithm 21. 合并两个有序链表
Investment transaction management
论文精读:Generative Adversarial Imitation Learning(生成对抗模仿学习)
A special file upload
电装中国采用 Oracle HCM 云技术解决方案加速人力资源数字化转型
数据库课程虚拟教研室负责人杜小勇:立足国产数据库重大需求,探索课程体系建设新模式
喜讯丨敏捷科技入选《2022年中国数字安全百强报告》
线程死锁的理解
Gartner表示:云数据库发展强劲,但本地数据库仍然充满活力
一次特殊的文件上传
免费易用 ,腾讯Arm云实例评测 - AI推理加速
[Jenkins] shell script calls Jenkins API interface
Super simple C language Snake does not flash screen double buffer
【毕业季·进击的技术er】青春不散场
Evaluation of scientific research award and entrepreneurship Award
普乐蛙VR台风逃生体验VR灾害自救模拟系统VR科普知识设备
超简单的C语言贪吃蛇 不闪屏 双缓冲