Redis

Redis

简介

特点

  • 内存数据库,
  • 基于KV,NoSQL

数据类型

  • 字符串(string)

    • set/get
    • mset/mget
  • 列表(list)

    • lpush/rpush
    • lpop/rpop
    • lpushx/rpushx
    • llen/linsert/lset/lrem/lindex/lrange/ltrim
    • rpoplpush
  • 散列(map)

    • hset/hget
    • hmset
  • 集合(set)

  • 有序集合(order_set)

  • HyperLogLog

  • 事务

  • 发布订阅

典型用法

  • 缓存
  • session
  • 访问计数
  • 分布式锁
updatedupdated2024-05-152024-05-15