Why it matters

TTL shapes cache efficiency. Understanding shapes design.

Advertisement

The architecture

Embeddings: long (stable).

Prompt cache: minutes (session).

Response cache: hours-days.

TTL by cache typeEmbeddingslong TTLPrompt cacheminutes (5 min Anthropic)Response cachehours-daysProvider TTL (5-min Anthropic) constrains; align app TTL to provider
LLM cache TTL.
Advertisement

How it works end to end

Embeddings: weeks / model lifetime.

Prompt: match provider (Anthropic 5 min).

Response: content freshness dependent.