Skip to main content

AI Memory · Learn · Lesson 3

Caching makes the same beginning cheaper to read.

When a request starts with the same text as the one before it, the model can reuse the reading it already did.

What Is Prompt Caching?

Prompt Caching is a way for a Large Language Model (LLM) to skip work it has just done. A model keeps nothing between messages, so the app sends the whole chat again every time you press send: the instructions, the tools, the files and every earlier message. Most of that is word for word what it sent a moment ago.

With caching, the model's reading of that unchanged beginning is saved for a short time. When the next request starts with exactly the same text, the saved reading is reused and only the new part is read from scratch. Each reused Token is charged at a fraction of the usual price, and the reply starts sooner.

Two things do not change. The answer is the same one you would get without caching, and the cached text still takes up its full room in the context window. Here are three requests from one chat, in the order they were sent.

First Message (cache write)

A cache write is the first request in a chat. The model reads all of it in full, and its reading of the beginning is saved for a short time. Some makers charge a little more for this first read.

Instructions  read, then saved
Tools         read, then saved
Files         read, then saved
Question 1    read

Second Message (cache hit)

A cache hit is a request that begins with the same text as the one before it, character for character. The model reuses its saved reading of that part and reads only what is new: its last reply and your next question. Each hit starts the clock on the cache again.

Instructions  reused
Tools         reused
Files         reused
Question 1    reused
Reply 1       read, then saved
Question 2    read, then saved

Changed Beginning (cache miss)

A cache miss is a request whose beginning has changed: an edited instruction, a tool connected or removed, a different model. The match must be exact from the first character, so nothing after the change can be reused.

Instructions  one word changed
Tools         read again
Files         read again
The chat      read again
Question 3    read

How Long Does a Cache Last?

There is no one answer. A cache is kept for a short time after it was last used, usually minutes and sometimes an hour or more, and every reuse starts the clock again. The length and the discount both depend on the maker, the model, and what the app or developer asked for.

Where an app uses caching, it does it for you. Claude Code handles it, and Claude's help pages say content in projects is cached. Developers choose it when they build, and each maker lists its own lifetimes and prices.

ClaudeAnthropic lists how long a cache lasts and what it costs.Anthropic's Caching Guide
ChatGPTOpenAI explains which models cache and for how long.OpenAI's Caching Guide
GeminiGoogle explains how caching works for the Gemini models.Google's Caching Guide

Last Updated: November 2026

Common Mix-Up

Caching is a discount. It isn't memory.

The word sounds like remembering. It only means the model skips reading again what it was just sent.

Same Answer

It Learns Nothing

Anthropic: "The response you receive is identical to what you would get if prompt caching were not used."

Same Window

It Takes Room

Cached text still fills the window. Anthropic: caching "changes what you pay for those tokens, not whether they count."

Same Chat

It Expires Soon

Leave a chat alone long enough and the saving is gone. A new chat tomorrow starts from nothing.

What Helps It Work

You rarely control caching directly, but your habits decide whether it can happen.

  1. Keep the start the same. Instructions and reference material come first and stay unchanged.
  2. Put what changes last. Today's date, the new question and the latest file go at the end.
  3. Don't switch mid-task. A new model or a change of tools starts the reading over.
  4. Keep going while it's warm. After a long pause the saving has expired.
Works
Instructions      reused
Reference file    reused
Today's date      new
Your question     new
What stays the same comes first, so the beginning can be reused.Breaks
Today's date      new
Instructions      read again
Reference file    read again
Your question     new
Something new sits at the top, so all that follows is read again.

For What Should Last, Write It Down

Caching saves money inside one sitting. It was never meant to carry anything over to tomorrow.

What should still be true next week belongs somewhere durable, where any chat in any app can fetch it. One Memory for Every AI shows how a library does that.

Next Week · New Chat, Library Connected

Claude
What did we settle on for the cohort price?
MythOSSearched your library

A flat fee, priced by outcome. You logged it on November 18.

Journal

Wed, November 18th, 2026Last Week
Timeline
Decided: the cohort tier is priced by outcome. See Pricing a Cohort.

Hot Tip

Write small, link often, and make hubs.

How you write decides how well a library works as an AI's memory. Give each memo one subject, as Atomic Notes do, and mention the memos it relates to. Every mention adds a link to your Knowledge Graph, so your AI can ask for a memo's Backlinks and follow them to what a question needs.

Then make a hub for each topic: one memo that lists the others by name, each with a line on what it holds. Your AI reads a hub the way it reads its list of tools. The list is short, and the full memo is opened only when it is wanted. That is Progressive Disclosure, and it leaves room in the context window for the work.

The six steps are in How to Write Memos Your AI Can Navigate, a memo you can fork into your own library.

Frequently Asked Questions

What is prompt caching?
Prompt caching lets a Large Language Model (LLM) reuse the reading it did on the beginning of a prompt when the next request starts with exactly the same text. The reused part comes back faster and is billed at a fraction of the normal price.
Does caching mean the AI remembers me?
No. Caching does not change what the model knows or how it answers. It only makes reading the same beginning again cheaper for a short time. What carries over from one chat to the next is the work of AI Memory Systems.
How long does a prompt cache last?
A short time, usually minutes and sometimes an hour or more. With Prompt Caching the length depends on the maker, the model and what the app asked for, and each reuse starts the clock again.
Does cached text still fill the context window?
Yes. A cached Token costs less to read, and it takes up exactly the same room. Caching changes what the text costs, never how much the model can hold at once.
Do I have to turn caching on?
Not in an app that uses it. Claude Code handles caching for you, and Claude's help pages say content in projects is cached. Developers who reach a model through its Application Programming Interface (API) choose how it is set up.