← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 4389

缓存过期与淘汰

理解等级:高级

过期控制结果可被使用多久,淘汰决定空间不足时先移除什么。TTL 太短会频繁回源,太长会增加陈旧风险;LRU、LFU、FIFO 分别按近期性、频率和进入顺序取舍,两类策略解决不同问题。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 从单机逐步扩展 · 查看原书依据

      Expiration policy. It is a good practice to implement an expiration policy. Once cached data is expired, it is removed from the cache. When there is no expiration policy, cached data will be stored in the memory permanently. It is advisable not to make the expiration date too short as this will cause the system to reload data from the database too frequently. Meanwhile, it

    参考来源

    - 位置:《System Design Interview – An insiders guide, Second Edition》第01章《从单机逐步扩展》(来源项目 book-sources;源文件:extracted/System Design Interview – An insiders guide, Second Edition/_epub-src/text/part0004_split_006.html) - 结论依据:原文在该位置给出所述对象、机制或比较,支持本卡的解释;原书未展开的实现不作为已证明结论,算式与一致性边界在正文明确限定。 - 原始内容:Expiration policy. It is a good practice to implement an expiration policy. Once cached data is expired, it is removed from the cache. When there is no expiration policy, cached data will be stored in the memory permanently. It is advisable not to make the expiration date too short as this will cause the system to reload data from the database too frequently. Meanwhile, it