AI Infra Interviews logo
← LLM Inference & Serving / 12
mediumSGLangAnthropicOpenAI

Every request shares a 2,000-token system prompt. How does prefix caching exploit that, and how does the radix tree work?

Two requests share 2,000 leading tokens but ask different questions afterward. Follow the shared state through a branch, calculate the reusable blocks, and distinguish memory savings from measured latency savings.

Updated Oct 2026 · Learn how AI infrastructure works through explanations, worked examples and diagrams, then practise applying it to interview questions.

Two requests share 2,000 leading tokens but ask different questions afterward. Follow the shared state through a branch, calculate the reusable blocks, and distinguish memory savings from measured latency savings.

This answer is included with a free account. Sign in to read it and save your progress.

free account · no card needed

Work through the numbers

Change the assumptions in a free calculator, then explain what the result establishes and what still needs measurement.

UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

Trace a shared prefix and its two branches through cache lookup and physical ownership. Explain compatibility, active references and eviction without assuming that every repeated prompt produces a hit.

DISCUSSION · 0

No comments yet — be the first to share your approach.