通用命令

  • keys

    keys *
    keys "h*"
    
  • dbsize

    dbsize
    
  • exists key

  • del key

  • expire key seconds:过期时间

    expire key 3
    
  • ttl:查看剩余过期时间

    ttl key
    
  • persist :永不过期

  • type key :数据类型

数据结构和内部编码

002 redis通用命令
002 redis通用命令

单线程架构

  1. 一次执行一条命令

  2. 拒绝长(慢)命令

    keys, flushall, flushdb, slow lua script ,mutil/exec, operate big value
    
  3. 有的地方不是单线程

    fysnc file descriptor
    close file descriptor
    

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2021-11-05
  • 2021-07-14
  • 2021-07-02
  • 2021-12-16
  • 2021-08-31
猜你喜欢
  • 2021-06-07
  • 2022-01-18
  • 2021-12-12
  • 2021-08-04
  • 2021-11-20
  • 2021-12-16
  • 2021-06-20
相关资源
相似解决方案