redis 使用场景
缓存
分布式计数器
分布式 id 生成
incr 2000 ,缓存在本地使用,用完再请求
海量数据统计
bitmap 日活统计,周活统计,连续签到,是否...
会话缓存
分布式队列/阻塞队列
LPUSH key element [element ...]
summary: Prepend one or multiple elements to a list
RPUSH key element [element ...]
summary: Append one or multiple elements to a list
LPOP key [count]
summary: Remove and get the first elements in a list
RPOP key [count]
summary: Remove and get the last elements in a list
BLPOP key [key ...] timeout
summary: Remove and get the first element in a list, or block until one is available
BRPOP key [key ...] timeout
summary: Remove and get the last element in a list, or block until one is available