A developer interpolates a request ID into the system prompt before se — CCA Advanced Practice — Claude Cert Academy

A developer interpolates a request ID into the system prompt before sending to Claude. What does this break?

Answer: Prompt caching — the cache key changes on every request, so caching is effectively disabled

The cache key is the literal bytes of the prompt prefix. Interpolating a unique request ID makes every cache key different, so every call is a cache write (125% pricing) with no hits. Move dynamic content like request IDs to AFTER the cache breakpoint or to the user message.

Continue to Claude Cert Academy