知识卡片
缓存资格取决于完整输入
无状态接口较容易分析请求独立性,但不代表所有结果都可跨用户、跨时间复用。只有相同有效输入下结果满足可复用条件,且缓存键包含身份、权限和其他影响因素时,才能安全共享副本。原书把确定性作为缓存收益的条件,不能省略这个前提。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Scalability · 查看原书依据
If a service knows that the result of a particular request will always be the same, regardless of who’s making it or when, the result can be safely set aside for easy retrieval later, increasing efficiency and reducing response time. These might seem like four different things, but there’s overlap with respect to what they
参考来源
- 位置:《Cloud Native Go》第07章《Scalability》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch07.xhtml)
- 结论依据:无状态接口较容易分析请求独立性,但不代表所有结果都可跨用户、跨时间复用。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。
- 原始内容:If a service knows that the result of a particular request will always be the same, regardless of who’s making it or when, the result can be safely set aside for easy retrieval later, increasing efficiency and reducing response time. These might seem like four different things, but there’s overlap with respect to what they