PulseAugur
实时 22:49:40
English(EN) I Measured Claude Code's Prompt-Cache Cost Three Ways. 85% of It Wasn't Mine to Trim.

Claude Code 提示缓存成本分析,揭示固定开销和启动路径影响

AnthropicClaude Code 的分析显示,启动路径显著影响提示缓存成本。使用 VSCode 扩展或内部 VSCode 终端会命中一个共享的服务器端缓存,而独立终端则不会,导致成本更高。研究发现,约 85% 的缓存创建成本是 Claude Code 本身的固定开销,只有约 15% 可以通过修剪文件或技能由用户控制。此外,Claude Code 启动的子代理不继承父会话的缓存,每个子代理都会产生自己的固定成本,当并行运行多个子代理时,这会成倍增加费用。 AI

影响 了解 Claude Code 的成本结构可以帮助开发人员优化使用并管理费用。

排序理由 对特定产品成本结构和使用模式的分析。

在 dev.to — Anthropic tag 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

Claude Code 提示缓存成本分析,揭示固定开销和启动路径影响

报道来源 [1]

  1. dev.to — Anthropic tag TIER_1 English(EN) · Sho Naka ·

    I Measured Claude Code's Prompt-Cache Cost Three Ways. 85% of It Wasn't Mine to Trim.

    <p>I ran the same empty Claude Code project through three launch paths and read the cache tokens off the session log after every turn. One of those paths never touched the shared server-side cache at all — <code>cache_read</code> stayed at 0 on every run.</p> <p><strong>TL;DR: th…