← AI Architecture Patterns
Core

Prompt and Prefix Caching: Why Prompt Layout Is a Cost Decision

Prompt or prefix caching lets providers reuse their processing of a repeated prompt prefix, billing it at a steep discount and speeding up the first token. This guide explains how it works, the pricing of writes and reads, time-to-live, the layout rules that make it work, how it fails, and how to compute the savings.

CONCEPT / AI ARCHITECTURE PATTERNS

Free account

Read this concept with a free account

Read this concept at no cost by signing in with Google.

no card needed
RELATED CONCEPTS
PRACTISE THIS CONCEPT