Disable Cache in Claude Code | Generated by AI

Home 2025.08

In Claude Code, that snippet

"cache_control": {
  "type": "ephemeral"
}

means that the response (or artifact) produced by the model is not cached for reuse.

Why it exists

Normally, Claude Code (and other Anthropic SDKs) may cache responses to speed things up if you send the same prompt again. But when you set "cache_control": { "type": "ephemeral" }, you’re telling the API:

When to use

This is useful if:

In short, "ephemeral" makes Claude’s output transient—private to this interaction, with no caching across calls.

Would you like me to also explain how this differs from the default cache_control behavior in Claude Code (e.g. type: "default" vs "none" vs "ephemeral")?


Back Donate