MorseSign inStart freeOpen Morse

Does prompt caching store your data? What seven AI APIs keep, and for how long

The Morse teamPublished 9 min read

Yes, as of November 2026, prompt caching stores your data on the AI provider's machines for a short time by default, from 5 minutes at Anthropic (Anthropic) to as long as 24 hours at OpenAI (OpenAI) and Google (Google Cloud). A cache you create on purpose with Google's explicit caching lasts as long as you set it (Google). DeepSeek, the outlier, says its disk cache is cleared "usually within a few hours to a few days" after it's last used (DeepSeek). What's kept is usually the model's processed form of your prompt, not the text itself, and OpenAI, Anthropic, Google, and Groq each say one customer's cache is never served to another (OpenAI, Anthropic, Google Cloud, Groq).

We read each provider's own caching and data retention pages on November 16, 2026, along with a published audit of how real APIs share their caches. Anthropic deserves credit for the plainest statement of the lot: its cache is held "in memory only" and "not stored at rest" (Anthropic). Google Cloud says outright that its default cache moves to durable storage when memory fills up (Google Cloud).

How long does each AI provider keep a prompt cache?

From minutes to days. Each row links to the provider's own page, read November 16, 2026.

ProviderWhat's cachedHow longAllowed under zero data retention?Shared with other customers?Source
OpenAI APIKey/value tensors, "rather than the original prompt text," as encrypted state in GPU-local storageGPT-5.6 and later: at least 30 minutes, or 12 hours on request. Older models: about 5 to 10 idle minutes in memory, or up to 24 hours. 24 hours at mostYes: "All prompt caching features are compatible"No, not across organizations or regional processing boundariesOpenAI
Anthropic APIKey/value representations and cryptographic hashes, in memory onlyAt least 5 minutes, or 1 hour at extra cost, then deleted "promptly, though not immediately"Yes, except on Covered Models, which need 30-day retentionNo. Separate per workspace on the Claude API, per organization on Bedrock and Google CloudAnthropic
Gemini API, implicitData "strictly in RAM (not at-rest)"24 hoursYes: "This does not violate zero data retention"No, isolated per projectGoogle
Gemini API, explicitThe content you choose to cache1 hour unless you set it, with "no minimum or maximum bounds"No: skip it for "an absolute zero-data footprint"Not stated on the pageGoogle
Google Cloud (Agent Platform)Inputs, outputs, and derived data in memory, then key/value data on durable storage when memory runs outDeleted "no later than 24 hours" after it's written, in both tiersOnly with caching offNo, scoped to your projectGoogle Cloud
xAI APIMatching message prefixes, stored per serverNo period given; entries "can be evicted at any time"Not addressed in the caching docsNot statedxAI
DeepSeek APIA hard-disk cache, cut at the end of your input and at the end of the model's output"usually within a few hours to a few days" after it's last usedNot addressed on the pageNot stated on the pageDeepSeek
GroqPrefixes in volatile memoryExpires after 2 hours without useNot addressed on the pageNo, not "shared between organizations"Groq

Three rows describe storage beyond a memory-only cache. OpenAI writes encrypted tensors to what it calls "GPU-local storage," Google Cloud spills to durable storage, and DeepSeek builds its cache on hard disks. Anthropic, Groq, and the Gemini API's implicit cache say they stay in memory.

What does a prompt cache store?

Mostly the model's working state for the start of your prompt, though Google's in-memory cache holds more. When a model reads a prompt, it computes key and value tensors for every token, and a cache keeps those so the next request with the same opening can skip the work. OpenAI says its cache "stores key-value (KV) tensors rather than the original prompt text" (OpenAI). Anthropic says it "does not store the raw text of your prompts or Claude's responses," only key/value representations and cryptographic hashes (Anthropic).

Google Cloud describes a wider cache. Its in-memory tier "stores Customer Data (inputs, outputs, and derived data)," and when that tier is full, Google "stores derived cache data (key-value representations computed from your inputs) in durable storage" (Google Cloud, updated November 12, 2026). That durable copy is "stored at rest and encrypted with Google default encryption." Google adds that customer-managed encryption keys "aren't supported for durable caching." It also says cached data "is never used to train or fine-tune models," and the paid Gemini API terms list "cached content" among the things Google doesn't use to improve its products.

DeepSeek caches replies as well as prompts. Each request produces two cache units, one "at the end position of the user input and the end position of the model output" (DeepSeek). Its context caching is "enabled by default for all users," and "each user request will trigger the construction of a hard disk cache."

You can't open a cache and read it back. Google says "it's not possible to retrieve or view cached content," only metadata like its name, model, and expire_time, and that you can delete an explicit cache yourself (Google). Anthropic says "there's no way to manually clear the cache" (Anthropic).

Is prompt caching covered by zero data retention?

At OpenAI and Anthropic yes, and at Google it depends on which of its products you use. OpenAI says "all prompt caching features are compatible with Zero Data Retention," with a 24-hour ceiling (OpenAI). On older models, an organization without ZDR defaults to the 24-hour cache, and one with ZDR defaults to the in-memory cache. On GPT-5.6 and later, OpenAI calls the 30-minute and 12-hour settings minimum lifetimes and says "OpenAI may retain entries longer than the requested minimum." Its data controls page adds that the cached tensors are "not retained after the 24-hour expiration" (OpenAI).

Anthropic marks prompt caching "ZDR eligible" with one exception (Anthropic). Its data retention page names Claude Fable 5, 5.1, and 5.2 and Claude Mythos 5, 5.1, and 5.2 as Covered Models that "require 30-day data retention," so ZDR isn't available on them "unless expressly authorized by Anthropic" (Anthropic).

Google gives two answers. The Gemini API's page says implicit in-memory caching "does not violate zero data retention," but that explicit caches are stored for the time you set, so "to achieve an absolute zero-data footprint, do not utilize the cached_content feature" (Google). Google Cloud's page goes further and turns both its in-memory and durable tiers on by default. Its context caching page says "to prevent cache data retention, disable implicit caching and avoid creating explicit caches" (Google Cloud, updated November 13, 2026).

Routers disagree on the definition too. OpenRouter wrote that Google "has taken the stance that models with implicit prompt caching are in fact 'retention'," and that OpenRouter itself counts endpoints "with implicit caching but no other form of persistent storage" as ZDR-compliant (OpenRouter, updated June 24, 2026). We cover how OpenRouter routes for zero retention in is OpenRouter private, and how each provider defines ZDR in what is zero data retention.

Can another customer see your cached prompt?

Not directly, at the providers that say how their caches are separated. OpenAI says "caches are not shared across organizations" (OpenAI). Anthropic separates caches by workspace on the Claude API, Claude Platform on AWS, and Microsoft Foundry, and by organization on Bedrock and Google Cloud (Anthropic). Google scopes its cache to your project, and Groq says cached content is never "shared between organizations" (Google Cloud, Groq). xAI's caching pages and DeepSeek's caching page, read the same day, don't say how one customer's cache is kept apart from another's.

The risk researchers have tested is timing. A cached prompt is answered faster, so someone who can send requests that share your cache could guess what's in it from how quickly replies arrive. A Stanford team audited 17 API providers in September and October 2024 and detected prompt caching at 8 of them, with "global cache sharing across users" at 7, including OpenAI's text-embedding-3-small model (Gu et al., ICML 2025). The same audit confirmed per-organization caching at Anthropic's Claude 3 Haiku and OpenAI's GPT-4o mini, as those companies documented. The researchers disclosed their results to providers in October 2024, and "at least five providers made changes," such as turning off cache sharing across organizations. They also tried to pull other users' prompts out token by token and "were unable to execute practical prompt extraction attacks."

OpenAI also offers a prompt_cache_key parameter that keeps cache accounting separate for each customer or user of an app, and says it "helps prevent cache-hit probing across users" (OpenAI).

Can you turn prompt caching off?

At some providers. Google Cloud lets you turn off durable caching per project and keep the in-memory tier, or turn caching off entirely (Google Cloud). On Anthropic's Messages API, caching is opt-in through cache_control, but it's "always on" in Managed Agents (Anthropic). OpenAI says caching "is enabled by default for supported OpenAI models" (OpenAI). Groq's cache works "automatically on all your API requests" (Groq).

xAI suggests changing the x-grok-conv-id header or leaving it out to force a cache miss, and says caching doesn't change the output, which is "identical whether the prompt is served from cache or computed from scratch" (xAI). DeepSeek says its cache matches only the prompt prefix, and the reply still varies with settings "such as temperature" (DeepSeek).

These switches belong to whoever holds the API account. If you type into an app built on these APIs, the app's developer makes these choices for you, along with the abuse-monitoring logs we cover in what is AI abuse monitoring.

How Morse limits what a host can tie to you

Every cache, log, and stored copy on this page sits with a provider that read your prompt and knows which account sent it. Morse limits both, in a different way in each privacy mode, which you choose for each chat. In E2EE, no host outside a verified enclave reads the prompt, and in Private and Anonymous, our proxy removes your account, email, and IP address before the message reaches the provider.

  • E2EE, for prompts you don't want any host to read. Your browser checks a secure enclave's hardware attestation, then encrypts the message on your device so only that enclave can open it. Morse's servers relay ciphertext they can't read. The enclaves are run by third-party providers, not by Morse, and the guarantee rests on the enclave hardware and attestation working as designed. E2EE runs open-weight models like GLM, Kimi, and DeepSeek, with no web search or image generation, and comes with Pro at $19 a month.
  • Private, the default, for open-weight models and Grok. Our proxy strips your identity here too, so the provider sees the message without knowing it's you. Morse has zero data retention agreements with its inference, search, and other providers, so they've agreed to keep nothing. Where a provider confirms zero retention on each reply, Morse checks it and refuses a reply that doesn't.
  • Anonymous, for GPT, Claude, and Gemini without your name attached. Our proxy removes your account, email, and IP address before the message reaches the provider, so the provider sees it without knowing it's you. The provider may keep it for a limited time to check for abuse, under its own policy, so leave out details that point to you.

In every mode, your chat history is stored in your browser, encrypted, not on Morse's servers, and Morse doesn't train AI on your chats, sell your data, or show ads. Clearing your browser deletes those chats for good, and Morse can't recover them, so copy out anything you need to keep.

Try a chat from the Morse home page without an account, or start free and open your first E2EE chat when you move to Pro.

Common questions

Is a cached prompt used to train the model?

Google's pages say no. Google Cloud says cached data is never used to train or fine-tune models, and the paid Gemini API terms list cached content among the things Google doesn't use to improve its products.

Does a cached prompt change the answer you get?

No, according to xAI, which says the output is identical whether a prompt comes from the cache or is computed from scratch. DeepSeek adds that settings like temperature still make each reply vary.

Can you look inside a Gemini context cache?

No. Google says it isn't possible to retrieve or view cached content. You can read only its metadata, such as its name, model, and expiry time, and you can delete the cache yourself.

Does paying for a 12-hour cache at OpenAI mean your data is kept 12 hours?

It means at least that long. OpenAI calls 12 hours a minimum lifetime and says it may keep entries longer. The ceiling stays at 24 hours.

Ask what you actually want to ask.

80+ models, characters, and images, with every chat encrypted and kept on your device. Free to start.

Start a private chat

Read next