{
  "id": 10803252,
  "title": "Claude Prompt Caching Hit Rate Was 0%. One Timestamp Did It",
  "url": "https://urgent.news/2026/09/29/claude-prompt-caching-hit-rate-was-0-one-timestamp-did-it",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-29T22:59:17.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ji_ai/claude-prompt-caching-hit-rate-was-0-one-timestamp-did-it-ic6"
  },
  "original_language": "en",
  "account": "Claude prompt caching hit rate was 0% on 3,412 calls, despite the cache write premium. The issue was caused by a timestamp in the system prompt, which made each request unique and not eligible for caching. After moving the timestamp to the end of the request, the hit rate improved to 78%, but stalled at 93% due to a second bug caused by Python's hash randomization. The fix was to sort the tools list to ensure consistent prefixes across worker processes.",
  "summary": "I turned on Claude prompt caching, shipped it, and moved on. Nine days later I looked at the usage logs and saw cache_read_input_tokens: 0 on every one of 3,412 calls. Not a low hit rate. Zero. And it was worse than zero, because every one of those calls paid the cache write premium. Turning on caching had made my bill go up. The cause was one line: a timestamp at the top of my system prompt.…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}