C.W.K.
Stream
Lesson 04 of 05 · published

Cache Is Not Memory

~24 min · cache, memory, state

Level 0Window Watcher
0 XP0/50 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete

Caching speeds repeated input

Prompt caching helps reuse already-processed prefixes. It does not decide what matters, store durable facts forever, or update the project's source of truth. It is a performance feature, not a memory system. A warm cache feels like memory until it expires, the prefix changes, or the model is replaced — then the illusion vanishes.

Use each layer for its job

Cache for repeated static input. Memory for durable facts and user preferences. Handoff for current task state. Retrieval for source material loaded by pointer. The window for active work. Confusing them is how systems become fragile in ways that defeat root-cause analysis.

The drift to remember

If your system 'remembers' a fact only because the cache is warm, you have a latent bug. The right test: clear the cache, restart the session, and see whether the fact still surfaces. If not, that fact needs a real home — durable memory or an explicit handoff — not just cached context.

A warm cache can feel like memory. It is not memory.

Code

Cache vs memory·yaml
context_layers:
  cache:     "reuse stable prefix cheaply"
  memory:    "durable facts and preferences"
  handoff:   "current task state"
  retrieval: "load source material by pointer"
  window:    "active working set"
Cold-start test·text
After any 'remembered' behavior:
  1. Clear or invalidate the cache.
  2. Start a fresh session.
  3. Repeat the prompt.
  4. If the behavior disappears -> that 'memory' was actually cache.
  5. Move it to durable storage if it should survive.

External links

Exercise

For one AI product idea, decide which facts belong in cache, memory, retrieval, handoff, and active context. Run the cold-start test mentally — what would still surface after a cache clear?
Hint
If the fact must survive tomorrow, it is not merely cache.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.