Buyer's Guide
Prompt Cache or Answer Cache: What Does an AI Cache Hit Reuse?
A prompt-cache hit reuses eligible computation from an unchanged prompt prefix while the model generates an answer for the new request. A semantic answer-cache hit returns a prior response selected through a similarity match. Decide which reuse the request permits before treating cache-hit figures as evidence of equivalent capability, relevance or cost.
Follow the prefix into a newly generated answer
Bedrock describes reusing eligible work from a stable prompt prefix. The data path is common prefix plus new question into model inference: prefix computation can be reused while the model generates the requested answer.
Exact matching concerns that prefix, not similarity between questions. Changed prefix content can cause a miss; repetition alone does not guarantee a hit. Use reported cache usage for the selected model and API to establish what was reused.
References: [DEI-CACHE-01]
Follow the semantic match to a prior response or model fallback
AWS's semantic-caching overview describes storing query embeddings with their corresponding responses. An embedding is a numerical representation used for similarity matching. A new query's embedding is compared with stored query vectors. An accepted match returns the previously generated response instead of invoking the answer-generating model. Otherwise, the model generates a response, and the query embedding and answer can be stored for later reuse.
The path therefore begins with embedding and matching, then branches to a cached answer or model fallback. Different strings can match. Similarity identifies a potential reuse; the buyer still needs to establish whether the old answer applies.
References: [DEI-CACHE-02]
Decide whether the old answer remains applicable
AWS distinguishes relatively stable answers from dynamic responses, describes eligibility restrictions using application context, and identifies a tradeoff between entry retention and outdated answers.
The buyer's inference is that similarity needs an applicability decision. Ordinary-hours and holiday-exception questions can share vocabulary but require different answers. Changed sources can invalidate an earlier response to identical wording.
Ask whether the stored answer fits the current tenant and permissions, conversation context, source edition, and accepted model or prompt edition. Those differences can make a prior answer ineligible even when a match is close. The application team should explain its decision and evidence; a similarity score alone establishes neither authorization nor correctness.
An entry being young enough to remain stored does not establish that its information is current. Freshness must follow the answer's underlying conditions.
References: [DEI-CACHE-03]
Compare two fictional paths through the same three requests
Consider an invented help desk. Every request carries the same eligible policy prefix P: stable instructions and the ordinary-hours rule. After P, a variable part supplies the question and the current dated holiday bulletin. The bulletin can change without changing P. Assume Q1 and Q2 have the same tenant, permissions and applicable context.
Q1 asks, "When does the desk normally open on a weekday?" Q2 asks, "What is the usual weekday opening time?" Before Q3, the holiday policy changes in the bulletin supplied after P. Q3 asks, "Does that opening time also apply on the holiday?"
In the prompt-cache alternative, stipulate that Q1 writes P and Q2 and Q3 each read P. All three requests generate new answers using their complete supplied context. The accounting is one prefix write, two prefix reads and three newly generated answers. Q3 can reuse the unchanged prefix while its new answer uses the updated bulletin.
In the separate semantic-cache alternative, Q1 generates an answer that is stored. Stipulate that Q2's match is valid and returns that prior answer. Q3 is deliberately ineligible for reuse because the ordinary-hours response does not answer the changed holiday case; it falls back to new generation with the updated context. This alternative has two generations and one response reuse.
These are alternative fictional paths, not consecutive stages or measurements. Eligibility and the reported events are stipulated; the example neither guarantees that a real model caches P nor proves a semantic match correct or predicts savings. Its purpose is to show why a prefix read and a returned prior answer cannot be counted as the same event.
Choose the permitted reuse before comparing hit rates
If the requirement is to generate an answer for each new question while carrying common material, evaluate reuse of that prompt work. If returning a prior answer is acceptable for stable repeat questions, evaluate response reuse with evidence that the selected answers remain applicable. A high match rate cannot settle that requirement.
Ask what the reported hit counts: requests with a prefix read, cached input tokens, successful similarity lookups or responses actually reused. Require the denominator and observation period as well. A prefix may cover only part of a request. A candidate semantic match may be rejected as inapplicable. Neither figure alone reports how many acceptable answers the application delivered.
In the example, two prefix reads coexist with three generations; one response reuse coexists with two generations. Compare each mechanism against its own stated purpose and the same required answer quality.
Price the work that remains on each path
Keep prompt cache writes, cache reads, uncached input and generated output separate. Bedrock's billing documentation identifies a cache-read rate and notes that write rates can exceed standard input rates, depending on the model. Reusing a prefix therefore does not erase the generation side of the comparison.
For the semantic alternative, include applicable embedding, lookup and storage operations, answer generation on fallback, and the work of evaluating freshness and eligibility. Identify which operations are included in the offer and which are separately charged or operated. A response served without new answer generation can still involve other work.
Use a current applicable tariff and an observed workload to price either alternative. Request the same observation boundary, answer-quality requirement and treatment of rejected reuse. The fictional event counts establish no monetary saving: one prefix write is not one stored-answer operation, and a prefix read is not an avoided complete model request.
References: [DEI-CACHE-01][DEI-CACHE-02][DEI-CACHE-03]
Carry the selected infrastructure into the physical project
The related memory guide covers KV-cache allocation alongside model weights and runtime memory. The phase-serving guide covers aggregated inference versus separate prefill and decode pools. Those are distinct decisions; a cache-hit claim does not establish a GPU memory allocation or serving layout.
If the selected arrangement requires physical infrastructure work, Leviathan's Complete Physical Deployment service provides a route to discuss agreed receiving, rack integration, hardware QA, installation, IT cabling and records. Bring a nonconfidential equipment list, locations, connection requirements and intended handoff to its project inquiry. Methods and resources are engagement-defined. Cache selection, software integration and managed inference remain with the appointed platform team.
References: [L1]
Primary sources
- [DEI-CACHE-01] Amazon Bedrock — Prompt caching for faster model inferenceChecked 2026-10-20. Prompt-prefix eligibility, cache misses and billing categories for supported Bedrock inference.
- [DEI-CACHE-02] Amazon ElastiCache — Overview of semantic cachingChecked 2026-10-20. Embedding-based query matching, prior-response return and model fallback.
- [DEI-CACHE-03] Amazon ElastiCache — Semantic caching best practicesChecked 2026-10-20. Stable and dynamic answer suitability, context eligibility and freshness tradeoffs.
- [L1] Leviathan Systems — Complete Physical DeploymentChecked 2026-10-20. Agreed physical delivery and handoff scope; application and software work require separately assigned responsibility.