1. Home
  2. Docs
  3. redis
  4. redis-应用场景

redis-应用场景

String 场景

  • 存储对象
  • 分布式锁
  • 计数器(浏览量)
  • 集群session共享
  • 分布式系统全局序列号(INCBY orderid) 维护数据主键自增id

hmash 场景

  • 存储对象 (hmset user {userid}:name zhang {userid}:balance 1111)
  • 购物车

list 场景

  • stack(栈)
  • queue 队列
  • 消息流

set 场景

  • 抽奖
  • 点赞 收藏
  • 关注模型
  • 好友关系

相关资料

诸葛老师-一线互联网公司Redis应用场景及实例分析全集

Tags
Was this article helpful to you? Yes No

How can we help?