随笔分类 -  Redis

摘要:Official document "Using Redis as an LRU cache" Eviction policies There are total 6 evicition policies so far: noeviction allkeys lru allkeys random v 阅读全文
posted @ 2020-04-16 13:47 ToRapture 阅读(196) 评论(0) 推荐(0)
摘要:本文参考了 "Redis源码3.0分支" 和《Redis设计与实现》。 对象 Redis基于下面提到的底层数据结构创建了一个对象系统,这个系统包括 、`List Set Hash Sorted Set redisObject type encoding ptr`。 底层数据结构 SDS Simple 阅读全文
posted @ 2019-12-15 13:34 ToRapture 阅读(205) 评论(0) 推荐(0)
摘要:协议格式 The way RESP is used in Redis as a request response protocol is the following: Clients send commands to a Redis server as a RESP Array of Bulk St 阅读全文
posted @ 2019-12-12 18:13 ToRapture 阅读(301) 评论(0) 推荐(0)
摘要:命令具体实现在 。 Memory 是redis通过在每次执行 和`free src/zmalloc.c used_memory`变量实现的 在linux中是通过读 这个文件的第24个字段 得到number of pages the process in real memory然后再乘以 实现的。 表 阅读全文
posted @ 2019-12-11 16:22 ToRapture 阅读(226) 评论(0) 推荐(0)