Skip to content

Connfirmed this behavior still exist in Claude Code v2.1.92. #1

@Cojad

Description

@Cojad

Round A — Header ON(控制組)

Session Prompt cache_read cache_creation input output hit_ratio
1 What is the capital of France? Answer in one word. 11,242 6,073 3 4 .6491
2 List three prime numbers under 20. 11,242 6,069 3 32 .6493
3 Explain what a goroutine is in one sentence. 11,242 6,073 3 70 .6491
4 Name one benefit of TypeScript over JavaScript. 11,242 6,070 3 52 .6492

小計: cache_read 總計 44,968 / cache_creation 總計 24,285 / 平均 hit ratio 64.92%


Round B — Header OFF(實驗組)

Session Prompt cache_read cache_creation input output hit_ratio
1 What is the capital of France? Answer in one word. 11,242 6,087 3 4 .6486
2 List three prime numbers under 20. 17,311 0 3 11 .9998
3 Explain what a goroutine is in one sentence. 17,315 0 3 65 .9998
4 Name one benefit of TypeScript over JavaScript. 17,312 0 3 52 .9998

小計: cache_read 總計 63,180 / cache_creation 總計 6,087 / 平均 hit ratio 91.20%


關鍵對比(Session 2–4)

指標 Round A (ON) Round B (OFF) 差異
平均 cache_read 11,242 17,313 +54%
平均 cache_creation 6,071 0 -100%
平均 hit_ratio .6492 .9998 +54%

Round B Session 2–4 達成 99.98% cache hit,且 cache_creation 為 0,證實關閉 attribution header 後,跨 session 的 system prompt + tools block 完整命中 cache,不再每次重建。

Thanks for sharing those valuable insights.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions