AnthropicCacheControl

Controls caching behavior for a content block.

When applied to a content block, everything up to and including that block is stored in the prompt cache. Subsequent requests that include the same prefix can read from the cache instead of reprocessing the tokens, which reduces latency and cost.

See Anthropic prompt caching docs.

Inheritors

Types

Link copied to clipboard
@SerialName(value = "ephemeral")
data class Ephemeral(val ttl: CacheTtl? = null) : AnthropicCacheControl

Ephemeral cache type.