当前位置:网站首页>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类型的键值对,并指定有效期。
边栏推荐
- Financial risk control practice - decision tree rule mining template
- 计算模型 FPS
- C note 13
- Three updates to build applications for different types of devices | 2022 i/o key review
- [SQL practice] a SQL statistics of epidemic distribution across the country
- Ctfshow-- common posture
- Vscode for code completion
- Niuke Xiaobai monthly race 52 E. sum logarithms in groups (two points & inclusion and exclusion)
- 安装VMmare时候提示hyper-v / device defender 侧通道安全性
- go-microservice-simple(2) go-Probuffer
猜你喜欢
Rk3399 platform development series explanation (WiFi) 5.52. Introduction to WiFi framework composition
VMware安装后打开就蓝屏
DC-7靶机
Experience sharing of contribution of "management world"
CloudCompare-点对选取
开发者别错过!飞桨黑客马拉松第三期链桨赛道报名开启
基于FPGA的VGA协议实现
ML's shap: Based on the adult census income binary prediction data set (whether the predicted annual income exceeds 50K), use the shap decision diagram combined with the lightgbm model to realize the
Bypass open_ basedir
Jstack of JVM command: print thread snapshots in JVM
随机推荐
Jinfo of JVM command: view and modify JVM configuration parameters in real time
A very good JVM interview question article (74 questions and answers)
JVM命令之- jmap:导出内存映像文件&内存使用情况
Implementation of VGA protocol based on FPGA
LM小型可编程控制器软件(基于CoDeSys)笔记二十三:伺服电机运行(步进电机)相对坐标转换为绝对坐标
rt-thread 中对 hardfault 的处理
QT console output in GUI applications- Console output in a Qt GUI app?
可极大提升编程思想与能力的书有哪些?
JVM command - jmap: export memory image file & memory usage
693. Travel sequencing
Vscode for code completion
If you don't know these four caching modes, dare you say you understand caching?
3531. Huffman tree
360 Zhiyu released 7.0 new products to create an exclusive "unified digital workspace" for the party, government and army, and central and state-owned enterprises
3428. Put apples
Test the foundation of development, and teach you to prepare for a fully functional web platform environment
Redis(一)——初识Redis
10W word segmentation searches per second, the product manager raised another demand!!! (Collection)
C. colonne Swapping [tri + Simulation]
Sequential storage of stacks