最新资讯
techmeme.com 视频生成初创公司 Sand.ai 完成 2 亿美元 A+ 轮融资 dev.to 腾讯 Hy4 对比 Mistral Large 4:Mistral 在开放权重上占优 wechat 抢跑DeepSeek!硅谷华人把下一代Agent Harness造出来了!? dev.to 14 天内 499 次自称 AI bot 的请求,仅 105 次可验证 dev.to llama.cpp 长对话重启后变慢的原因与修复思路 dev.to AI Agent 上下文压缩:在长任务遗忘前保存状态 dev.to 神经解码器输出的句子是估计,而非已验证的意图 unite.ai 当前 Muse 在 Meta 个人超级智能指数上得分 47% techmeme.com Meta 推出用 Muse Wonder 训练的现有模型专用版本,为 Muse 与 Meta AI 用户带来 Active Memory 和 Active Focus theinformation.com Meta 战略主管 Dave Wehner 将出任 Fireworks CFO dev.to 让 Agent 的 Shell 受治理:apexe 实践 techcrunch.com Crusoe 将陷入困境的怀俄明数据中心项目出售给 Google
多元动态
登录 注册
AI编码 dev.to · @Johmisking

实测 Claude Code 的 prompt cache 过期时间:暂停 0 到 65 分钟

原文 我的收藏

作者在 Claude Code 2.1.295、Opus 5.5、订阅登录、headless 模式下,先让模型生成一个 index.html 小游戏,再分别暂停 0、4、6、15、30、55、65 分钟后用 --resume 继续同一会话,要求修改小球颜色和速度,通过成本跳变判断 prompt cache 的实际有效期,以检验“5 分钟”与“1 小时”两种说法。摘要未披露最终结果。

AI推荐理由 作者对 Claude Code 的 prompt cache 过期时间做了实测:在 0、4、6、15、30、55、65 分钟暂停后继续同一会话,观察成本跳变点,以区分“5 分钟”与“1 小时”两种说法。这是开发者关心的成本与延迟问题,方法可复现;但摘要只给出测试设置,未给出结果数据,且为个人单点测试,样本与版本有限,结论需谨慎。

72

正文

You work in Claude Code all morning, go to lunch, come back and send one more message. The first reply is slow and your usage jumps. The usual suspect is the prompt cache: once it expires, the next message has to re-process the whole conversation. But how long does the cache actually last? Guides say five minutes, others say an hour, and in April 2026 there was a whole controversy about it. I couldn't find anyone who had simply waited and measured, so I did. The test Claude Code 2.1.295, Opus 5.5, medium effort, signed in with a subscription, headless (-p), no MCP servers Turn 1: build a small brick-breaker game in one index.html Wait 0, 4, 6, 15, 30, 55 or 65 minutes Turn 2 in the same session (--resume): "Make the ball red and slightly faster." Each pause in its own session, all started within a minute of each other, run twice (October 20, 2026) If the cache lasts five minutes, the cost should jump between 4 and 6 minutes. If it lasts an hour, between 55 and 65. Results First model call of the next message, mean of two runs. Cost is Claude Code's API list-price estimate. Pause Read fr

来源报道 · 1 篇 · 以下链接均前往原始媒体

← 返回精选动态 原文

更多内容