知识卡片

问题卡 · 4468

信息流缓存保存ID列表

理解等级:高级

时间线缓存仅保存帖子 ID 与用户关联,读取时再从用户及帖子缓存补齐展示对象,媒体从 CDN 获取。这样减少列表重复保存完整对象的内存成本,并可限制每个用户缓存的近期条数。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 信息流 · 查看原书依据

      The memory consumption can become very large if we store the entire user and post objects in the cache. Thus, only IDs are stored. To keep the memory size small, we set a configurable limit. The chance of a user scrolling through thousands of posts in news feed is slim. Most users are only interested in the latest content, so the cache miss rate is

    参考来源

    - 位置:《System Design Interview – An insiders guide, Second Edition》第11章《信息流》(来源项目 book-sources;源文件:extracted/System Design Interview – An insiders guide, Second Edition/_epub-src/text/part0027_split_003.html) - 结论依据:原文在该位置给出所述对象、机制或比较,支持本卡的解释;原书未展开的实现不作为已证明结论,算式与一致性边界在正文明确限定。 - 原始内容:The memory consumption can become very large if we store the entire user and post objects in the cache. Thus, only IDs are stored. To keep the memory size small, we set a configurable limit. The chance of a user scrolling through thousands of posts in news feed is slim. Most users are only interested in the latest content, so the cache miss rate is