RelayVano

← All postcards

Reading Cache Rows During a Release in Berlin

Fare watch EN

It is 4:40 p.m. in Berlin, and a release is waiting on a question from finance: why did yesterday’s AI usage cost less than the same workflow on Monday? The usage log has two unfamiliar columns, cache reads and cache writes. They describe what happened to parts of the prompt, not whether the model returned a useful answer.

Prompt caching lets a provider reuse an eligible part of an earlier request instead of processing that same part from scratch. A cache write records content being saved for possible reuse. A cache read records content reused from the cache. The exact rules and prices depend on the model and provider, so read these as usage signals, not as universal billing units.

Start with the request and response columns

Before looking at cache activity, identify the model, request time, input tokens, output tokens, and total cost. Input tokens represent the material sent to the model; output tokens represent the response. Some logs report cache activity separately from ordinary input tokens, while others use provider-specific accounting. Do not add columns together until you know whether the log already includes cached tokens in its input total.

Keep model and time in view. A workflow can change its model between runs, and cache entries can expire. Comparing two rows without checking those details can make normal behavior look like a pricing anomaly.

Read cache writes as stored prompt material

A cache write means that some eligible prompt content was written to a cache. It is not the same as writing a response to a file, and it does not necessarily mean the whole request was cached. Providers often cache repeated prompt prefixes, such as stable instructions or shared context, while the changing question comes later in the request.

On a first run, a cache write may appear before any cache read because there is nothing to reuse yet. A write can also cost more than ordinary input processing under some provider pricing rules. Check the model’s current rate details before treating a higher write count as a mistake.

Read cache reads as reused prompt material

A cache read means the request matched content already available in the cache, and that content was reused. If a recurring coding task sends the same instructions and repository guidance each time, those stable parts may be eligible. The individual task or latest user message can still be new input.

Reads often reduce repeated processing cost or latency, but not always by the same amount. The log may show a read token count and a separate charge, or it may show only an aggregate. A large read count is useful evidence of reuse; it is not proof that every token in the request was cached.

Compare rows across repeated runs

Choose two or more runs that use the same model and nearly identical prompt structure. Compare input tokens, cache writes, cache reads, output tokens, and cost. A common pattern is a write on the first run followed by reads on later runs. If every run shows writes and no reads, inspect whether stable prompt text is changing, whether requests are routed to different cache scopes, or whether the provider’s cache lifetime has elapsed.

For a clean comparison, keep shared instructions at the beginning of the prompt and changing details after them. Avoid inserting timestamps, random identifiers, or changing status text into the shared prefix unless the model workflow needs them. Small differences can prevent a cache match, depending on the provider’s rules.

Investigate a surprising cache total

  • Confirm the model and provider for each row.
  • Check whether cached tokens are included in the input total or reported separately.
  • Look up the provider’s cache eligibility, expiration, and pricing rules.
  • Compare prompt structure, not just token totals.
  • Review cost alongside reads and writes; usage volume alone does not show the bill.

For teams comparing AI model usage in one place, RelayVano is a pay-as-you-go relay for models including Claude Sonnet 5.5 and DeepSeek V4 Flash, and works with Claude Code, Codex, Gemini CLI, and OpenAI-compatible SDKs at https://api.relayvano.com. Sign up for RelayVano to route supported model requests and review usage in your workflow.

More postcards from this route