CacheControl

sealed interface CacheControl(source)

Cache control configuration for prompt caching. Indicates that the LLM provider should cache content up to and including the element this is attached to.

Each LLM provider defines its own supported cache control options as nested sealed interfaces.

Inheritors

Types

Link copied to clipboard
sealed interface Bedrock : CacheControl

Bedrock-specific cache control options. Bedrock supports only two TTL values: 5 minutes and 1 hour.

Functions

Link copied to clipboard
inline fun <T : CacheControl> CacheControl.require(): T

Requires this CacheControl to be of the specified type T, or throws an IllegalStateException.