聊一聊 Redis 数据内部存储使用到的数据结构

  发布时间:2025-11-05 12:41:45   作者:玩站小弟   我要评论
复制typedefstructredisDb{ dict*dict;/*ThekeyspaceforthisDB*/ dict*expires;/*Time 。
聊一聊 Redis 数据内部存储使用到的数据结构
复制typedef struct redisDb {      dict *dict;                 /* The keyspace for this DB */      dict *expires;              /* Timeout of keys with a timeout set */      dict *blocking_keys;        /* Keys with clients waiting for data (BLPOP)*/      dict *ready_keys;           /* Blocked keys that received a PUSH */      dict *watched_keys;         /* WATCHED keys for MULTI/EXEC CAS */      int id;                     /* Database ID */      long long avg_ttl;          /* Average TTL,聊聊 just for stats */      list *defrag_later;         /* List ofkey names to attempt to defrag one by one, gradually. */ } redisDb;  1.2.3.4.5.6.7.8.9.10.
  • Tag:

相关文章

最新评论