D5: Prompt Caching & Cache Checkpoints
Claude Certified Developer – Foundations exam practice questions · 11 flashcards
Question
What is prompt caching?
1 / 11
Tip: Space flips the card, ← / → navigate.
Show all 11 Prompt Caching & Cache Checkpoints practice questions and answers
- What is prompt caching?Reusing a previously processed prompt prefix so repeated requests are cheaper and faster.
- How do you mark content for caching?Add cache_control (type ephemeral) to the block that ends the prefix to cache.
- In what order is the prompt prefix cached?tools → system → messages.
- What breaks a cache hit?Any change to content before the breakpoint; the prefix must match exactly.
- What is the default cache lifetime?About 5 minutes, refreshed on each use; a longer 1-hour option exists at higher write cost.
- How are cache writes and reads priced?Writes cost more than normal input; reads cost only a small fraction of normal input.
- What is cache checkpointing?Placing several cache breakpoints (up to 4) so different prefix lengths can be reused.
- Is there a minimum cacheable length?Yes, a model-dependent minimum number of tokens.
- What content is ideal to cache?Long, stable content: system prompts, tool definitions, documents, examples.
- How do you confirm caching works?Check cache_creation_input_tokens and cache_read_input_tokens in usage.
- Where should dynamic content go?After the cached prefix, so it doesn't invalidate the cache.