Prompt caching reuses processed input while still generating a new answer. Response caching returns a previously stored answer and can avoid generation. Action caching reuses a procedure while checking current state. Choosing between them starts with identifying what can safely repeat: the context, the answer, or the steps.
What is prompt caching?
Prompt caching reuses previously processed input context. The model still handles the new request and generates an output. OpenAI documents matching prompt prefixes and eligible cache boundaries; Claude documents cache controls and separate cache-read and cache-creation usage. Exact eligibility, retention and pricing depend on the provider and model.
A useful starting layout is stable instructions and reference material first, followed by the changing question. But a stable prefix alone is not proof of a hit: check the cache configuration for the model you use and inspect its reported usage. Changing a timestamp at the beginning of every request can make an otherwise reusable prefix different.
What is response caching?
A response cache stores the application’s previous answer and returns it when an equivalent request arrives. A valid hit can skip generation. The difficult word is equivalent: the same question may require a different answer for a different customer, permission set or point in time.
A public glossary definition is a better candidate than a live account balance. Include the relevant account, version and freshness constraints in the lookup. A semantic match can identify similar wording, but similarity does not establish that two users are entitled to the same data.
What is action or plan caching?
An action cache stores a procedure rather than the final answer. For example, it can reuse the steps for opening an account’s invoices page, then read the current invoice total. The navigation is reusable while the data remains fresh.
Browser automation needs checks around that reuse. Confirm the website and account, make sure the expected control still exists, and verify the result after execution. A stale map should lead to validation or repair, not a confident click on a different control.
Which cache should you use?
Use prompt caching when many requests share substantial input but need new reasoning or answers. Use response caching when the result itself can safely remain unchanged. Use action reuse when the procedure repeats but the inputs or website data change. These layers can coexist in one application.
Consider a weekly report: cache stable instructions at the model layer, reuse validated navigation at the automation layer, and fetch this week’s numbers. Returning last week’s complete answer would be cheaper, but it would fail the task.
Measure the complete workflow
Compare cold requests, warm requests and invalidated entries. Include cache writes, lookups, validation, fallback generation and failed attempts. Keep answer quality and permissions fixed while comparing costs. A high hit rate is useful only when the reused work is correct.
Frugent applies the action-map idea to browser work: a compatible existing map can reduce first-run planning, and saved steps can improve repeat execution. That is separate from a model provider’s prompt cache. Neither layer guarantees a particular percentage saving.
Sign in ↗