Skip to content
Maliyet ve Performans Orta

Önbellek Ekonomisi Açıklaması

Prompt önbellekleme katmanlarını ve tekrarlanan içerikte %90 tasarruflarını anlayın

Komut

"color:#9CA3AF;font-style:italic"># First call: pays cache write cost
$ "color:#7C5CFC">claude -p "Hello" "color:#d97757">--output-format json
  
"color:#9CA3AF;font-style:italic"># Subsequent calls within 5 min: 90% savings on cached content
$ "color:#7C5CFC">claude -p "Hello again" "color:#d97757">--output-format json

Yanıt

| Cache Tier     | Duration | Cost       | Savings |
|----------------|----------|------------|--------|
| Ephemeral write | 5 min   | 1.25x input | —      |
| Long-lived write | 1 hour | 2.0x input  | —      |
| Cache read      | —       | 0.1x input  | 90%    |

Ayrıştırma Kodu

059669">">// 10-turn Opus session savings:
059669">">// Without cache: 10 × 15K tokens × $15/M = $2.25
059669">">// With cache: 1 write + 9 reads = $0.45 + $0.20 = $0.65
059669">">// Savings: 71% on input tokens
059669">">//
// 100-turn session: $50-100 without → $10-19 with caching

Tuzaklar

! Geçici önbellek 5 dakika hareketsizlik sonrasında sona erer — sonraki çağrı tekrar yazma maliyeti öder
! Önbellek okuma isabetlerini en üst düzeye çıkarmak için benzer prompt'ları art arda çalıştırın (%90 tasarruf)

İlgili Tarifler