当前位置:网站首页>redis的基础知识
redis的基础知识
2022-07-28 09:26:00 【MountainYanYL】
redis支持的数据类型
*----------------------------------------------------------------------------------------------
1、string ----key value 二进制 可以存放图片或者对象 set get
应用场景: 统计网站的访问人数、当前在线人数、粉丝数
2、hash -----键值对的集合,用来存储对象,hmset ,hgetall
-----------------------------------------------------------------------------------------------
string 类型的一个字段,field 和 value的映射表
应用场景:修改、增加、删除 用户的属性 每一个hash 可以存储2的32次方-1个键值对。
3、list 列表,简单的字符串列表。按照插入顺序,可以从头部或者尾部插入数据
应用场景:获取最新消息、关注列表,粉丝列表,秒杀进队列,
-----------------------------------------------------------------------------------------------
4、set 集合 无序 添加一个 string 元素到 key 对应的集合中成功返回1 如果已经存在 返回 0
应用场景:
1:利用交集 求共同好友,
2:利用唯一性 求网站的独立ip 秒杀的时候,保证只有一个手机号 ,参与秒杀
-----------------------------------------------------------------------------------------------
5、 zset 有序集合 如果存在 我就更新 zset成员是唯一的
应用场景:
1:时间线
2:游戏积分榜
3: 玩家分数发生变化 zadd
4: score vip 普通用户 有先vip
边栏推荐
- Sequence and limit operation of MATLAB
- ThresholdFilter简介说明
- Machine learning (10) -- hypothesis testing and regression analysis
- Edge团队详解如何通过磁盘缓存压缩技术提升综合性能体验
- pycharm使用conda调用远程服务器
- View事件分发机制源码解析
- C form application uses object binding DataGridView data binding
- FixedWindowRollingPolicy简介说明
- Inside database system distributed system
- Method parameter transfer mechanism of C #
猜你喜欢

超级原始人系列盲盒即将上线,PlatoFarm赋能超多权益

OSS direct upload rails service practice

使用Xposed对软件进行破解

With such a simple verification, 80% of programmers can't do it, let alone understand it!
![ASP.NET Core 6框架揭秘实例演示[29]:搭建文件服务器](/img/90/40869d7c03f09010beb989af07e2f0.png)
ASP.NET Core 6框架揭秘实例演示[29]:搭建文件服务器

【日志】日志干什么的?日志工厂是什么?log4j 的配置和使用? log4j.properties 文件配置、log4j jar包坐标

Use xposed to crack the software
Edge团队详解如何通过磁盘缓存压缩技术提升综合性能体验

Seeing clearly is more important than walking fast, because you can go far only when you walk right

go语言切片Slice和数组Array对比panic runtime error index out of range问题解决
随机推荐
OSS直连上传-Rails服务实践
领域事件和集成事件没那么高大上
mq的学习
EvaluatorFilter简介说明
Arouter source code analysis (II)
数据库高级学习笔记--系统包
Business visualization - make your flowchart'run'(4. Actual business scenario test)
ES6新特性
How view works
时序分析41 - 时序预测 TBATS模型
使用IdentityServer出现过SameSite Cookie这个问题吗?
Edge团队详解如何通过磁盘缓存压缩技术提升综合性能体验
极致通缩和永动机模型,将推动 PlatoFarm 爆发
Arouter source code analysis (I)
Salted fish esp32 instance - mqtt lit LED
Word segmentation results of ES query index fields
Mock.js
Seeing clearly is more important than walking fast, because you can go far only when you walk right
TimeBasedRollingPolicy简介说明
[summary of leetcode weekly competition] the 83rd fortnight competition of leetcode (7.23)