知识卡片
缓存可能掩盖发布故障
灰度验证若命中旧缓存,表面成功并不说明新版本真的处理了请求;缓存过期后故障才可能暴露。发布探测应确认请求到达目标版本,必要时按测试目的绕过缓存,并记录缓存键、有效期和回退后的状态影响。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
It turns out the cached result was masking the fact that our new software was broken. To avoid caching results it is important to set a header on the client making the GET request, i.e., Cache-Control: no-cache, no-store. Eventually the cache will expire and we achieve a consistent state.
参考来源
- 位置:《Mastering API Architecture》第5章《Deploying and Releasing APIs》之《Response Caching》(源文件:_epub-src/OEBPS/ch05.xhtml)
- 结论依据:原文案例中缓存响应掩盖新服务故障,直到代理变化后出现大量 500;书中建议验证请求时禁止使用缓存。
- 原始内容:It turns out the cached result was masking the fact that our new software was broken. To avoid caching results it is important to set a header on the client making the GET request, i.e., Cache-Control: no-cache, no-store . Eventually the cache will expire and we achieve a consistent state.