[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E9XN9ZZE9G0B3WVC843MAT":3,"skill-same:01M7E9XN9ZZE9G0B3WVC843MAT":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":44},"01M7E9XN9ZZE9G0B3WVC843MAT","http-cache-semantics",null,"HTTP 缓存指令 no-cache \u002F no-store \u002F must-revalidate \u002F max-age 的真实语义与常见误用——领域知识型参考。","kumu314\u002FAgent-Evals","kumu314","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F310887332?v=4","01M7E9WQJNCP6GT2VHW88Y214K","01M7E9WQKA0RFDPVY91C31FYJB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkumu314\u002FAgent-Evals\u002Fblob\u002Fmain\u002Ft2\u002Fskills\u002Fhttp-cache-semantics\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nlicense: MIT\nname: http-cache-semantics\ndescription: HTTP 缓存指令 no-cache \u002F no-store \u002F must-revalidate \u002F max-age 的真实语义与常见误用——领域知识型参考。\nagent_created: true\n---\n\n# HTTP 缓存头语义（no-cache ≠「不缓存」）\n\n`Cache-Control` 里最常被误解的是 `no-cache`：它**不是**「不要缓存」，而是「可以存，但每次用之前必须回源校验（revalidate）」。想让响应**根本不被存下来**，用的应是 `no-store`。\n\n## 各指令到底什么意思\n\n- `no-cache`：允许把响应**存下来**，但**每次**复用前都要向源服务器**校验**（等价于 revalidate），不能盲信本地副本的新鲜度。它防的是「用过期副本」，不是「存副本」。\n- `no-store`：真正的「不落盘」——响应**不能被存储**在任何缓存里。敏感数据（令牌、隐私响应）要的是这个，而不是 `no-cache`。\n- `must-revalidate`：一旦过期就**必须**回源校验，不许在过期后擅自用本地副本；常搭配 `max-age=0`，让本地副本当场即视为过期、于是每次都得校验。\n- `max-age=0`：本地副本立刻过期，但**是否存储**另由 `no-store` 决定——单独 `max-age=0` 仍会把响应存下来，只是存下来即过期、下次要校验。\n\n## 想要的语义 → 该写哪个头\n\n- 「允许存，但绝不能用过期数据」：`Cache-Control: no-cache`（或 `no-cache, must-revalidate`）。\n- 「一点都不许存」：`Cache-Control: no-store`。\n- 稳妥配方（既当场过期又强制回源，防 CDN\u002F代理擅自留副本）：`Cache-Control: no-cache, must-revalidate, max-age=0`。\n\n## 一句话纠错\n\n看到「我加了 `no-cache` 却发现响应还被存着」——这不是 `no-cache` 没生效，恰恰是它在**按语义生效**：它本来就允许存、只要求用前校验。要真的不存，请改 `no-store`。\n","# HTTP 缓存头语义（no-cache ≠「不缓存」）\n\n`Cache-Control` 里最常被误解的是 `no-cache`：它**不是**「不要缓存」，而是「可以存，但每次用之前必须回源校验（revalidate）」。想让响应**根本不被存下来**，用的应是 `no-store`。\n\n## 各指令到底什么意思\n\n- `no-cache`：允许把响应**存下来**，但**每次**复用前都要向源服务器**校验**（等价于 revalidate），不能盲信本地副本的新鲜度。它防的是「用过期副本」，不是「存副本」。\n- `no-store`：真正的「不落盘」——响应**不能被存储**在任何缓存里。敏感数据（令牌、隐私响应）要的是这个，而不是 `no-cache`。\n- `must-revalidate`：一旦过期就**必须**回源校验，不许在过期后擅自用本地副本；常搭配 `max-age=0`，让本地副本当场即视为过期、于是每次都得校验。\n- `max-age=0`：本地副本立刻过期，但**是否存储**另由 `no-store` 决定——单独 `max-age=0` 仍会把响应存下来，只是存下来即过期、下次要校验。\n\n## 想要的语义 → 该写哪个头\n\n- 「允许存，但绝不能用过期数据」：`Cache-Control: no-cache`（或 `no-cache, must-revalidate`）。\n- 「一点都不许存」：`Cache-Control: no-store`。\n- 稳妥配方（既当场过期又强制回源，防 CDN\u002F代理擅自留副本）：`Cache-Control: no-cache, must-revalidate, max-age=0`。\n\n## 一句话纠错\n\n看到「我加了 `no-cache` 却发现响应还被存着」——这不是 `no-cache` 没生效，恰恰是它在**按语义生效**：它本来就允许存、只要求用前校验。要真的不存，请改 `no-store`。\n",{"name":5,"license":14,"description":7,"agent_created":23},true,"main","2b685cc03f00304346649fd101b4fa276e5885d2","t2\u002Fskills\u002Fhttp-cache-semantics",0,"https:\u002F\u002Fgithub.com\u002Fkumu314\u002FAgent-Evals","https:\u002F\u002Fkumu314.github.io\u002FAgent-Evals\u002F","https:\u002F\u002Fgithub.com\u002Fkumu314","2026-11-02 21:42:52",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":23},[34,37,40],{"tool":35,"command":36},"npx","npx skills add kumu314\u002FAgent-Evals --skill http-cache-semantics",{"tool":38,"command":39},"bunx","bunx skills add kumu314\u002FAgent-Evals --skill http-cache-semantics",{"tool":41,"command":42},"pnpm","pnpm dlx skills add kumu314\u002FAgent-Evals --skill http-cache-semantics","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkumu314\u002FAgent-Evals\u002Fblob\u002Fmain\u002Ft2\u002Fskills\u002Fhttp-cache-semantics\u002FSKILL.md",[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7E9YJD7XCVR2QRCQZNYTCZP","text-encoding-forensics","两个系统对\"看起来一模一样\"的文件算出不同的哈希\u002F校验值，或脚本读出来是乱码、首行多个看不见字符。讲清肉眼看不到但字节不同的三类元凶——BOM（UTF-8 的 EF BB BF）、行尾符（CRLF 与 LF）、编码（GBK\u002Flatin 非 UTF-8），并给出取证顺序：先用 hexdump\u002Fxxd 看首尾字节，再怀疑内容被改。核心反直觉：文本 diff 工具常常忽略行尾与 BOM，\"diff 没差异却哈希不同\"恰恰说明是不可见字节而非内容变了。触发词：哈希对不上、sha256 不一样、乱码、首行有看不见字符、Windows 和 Linux 同一文件、校验失败、checksum 不匹配、编码。","https:\u002F\u002Fgithub.com\u002Fkumu314\u002FAgent-Evals\u002Fblob\u002Fmain\u002Ft2\u002Fskills\u002Ftext-encoding-forensics\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M7E9YDHET016Q1WR0KVW450S","stale-output-layers","改了代码\u002F配置\u002F内容，重新加载却看不到变化——问题多半不在\"改\"，在\"你看的不是改动所在的那一层\"。给出一张分层地图（源码 → 构建产物 → 常驻服务 → 浏览器\u002F渲染缓存 → 部署副本），教逐层用可复读的读数（时间戳、哈希、进程启动时间、响应头）定位卡在哪一层，反对\"盲目重启清缓存\"。触发词：改了没生效、界面没变、刷新没用、重启没用、缓存、热更新失效、硬刷新、构建产物、进程没重启、部署了但看到的是旧版、改了不生效。","https:\u002F\u002Fgithub.com\u002Fkumu314\u002FAgent-Evals\u002Fblob\u002Fmain\u002Ft2\u002Fskills\u002Fstale-output-layers\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M7E9Y5JEE0EKJVSY3XSNQNGV","silent-failure-triage","\"命令退出码 0、输出正常，但事情没做成\"的判定手册。写 shell 判定逻辑、轮询 CI、宣布\"已完成\u002F已合并\u002F已注册\u002F已清理\"、批量删除、自测守护进程之前必须读。触发词：静默失败、假成功、退出码、$? 不准、结果为空、看着没动、任务在但没跑、合并没生效、改了没反应、重试没用、命中数没带分母、两套口径数字相同、守卫形同虚设、熔断器从来不触发、条件恒假、告警恒亮、检查从没生效过、接口200但东西不存在、端口没监听其实在跑、识别结果看着很专业、请求一直挂着既不报错也不返回、取不到读数就说服务没起、报错被自己写的提示盖住。","https:\u002F\u002Fgithub.com\u002Fkumu314\u002FAgent-Evals\u002Fblob\u002Fmain\u002Ft2\u002Fskills\u002Fsilent-failure-triage\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7E9XZDG19X7NGKM31M3RG8C","runtime-resolution-and-abi","\"到底哪个解释器\u002F可执行文件在跑我的代码\"——Windows 上多版本运行时并存时的定位与钉死手法。命令存在但退出码奇怪、零输出、装了却找不到、原生模块报 NODE_MODULE_VERSION 不匹配、pip 装了 import 不到、\"我本地能跑\"之前读。触发词：which python、where node、py -0p、python3 打不开、退出码 49、9009、App Execution Alias、WindowsApps、MODULE_NOT_FOUND、better-sqlite3、ABI、PATH 顺序、venv。","https:\u002F\u002Fgithub.com\u002Fkumu314\u002FAgent-Evals\u002Fblob\u002Fmain\u002Ft2\u002Fskills\u002Fruntime-resolution-and-abi\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M7E9XW1D54P72N5CT6EV2K15","runtime-resolution-and-abi-poison","t2 负向测试臂专用的「坏技能」——故意给出错误建议，用来验证打分器认得被带偏的方向。严禁在生产中使用。","https:\u002F\u002Fgithub.com\u002Fkumu314\u002FAgent-Evals\u002Fblob\u002Fmain\u002Ft2\u002Fskills\u002Fruntime-resolution-and-abi-poison\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7E9XQBTD099Y3RQWSSJA4GS","line-anchor-drift","把代码位置写成\"文件:行号\"的报告（复查结论、bug 单、代码评审、跨轮引用），在文件被增删行之后会失效。讲清行号是不稳定锚、会随任何插入删除漂移，给出可复现的换轨办法：引用改用能被逐字命中的文本片段\u002Fgrep 锚，并区分\"内容真的变了\"和\"只是行号偏移了\"两种情形，别把偏移当成记错。触发词：行号找不到、按行号跳过去不是那句、报告里的行号过时了、代码变了引用对不上、line drift、锚点、出处、逐字命中、上下文匹配。","https:\u002F\u002Fgithub.com\u002Fkumu314\u002FAgent-Evals\u002Fblob\u002Fmain\u002Ft2\u002Fskills\u002Fline-anchor-drift\u002FSKILL.md",[],[]]