본문 바로가기
C.W.K.
Stream
Lesson 04 of 05 · published

Cache는 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은 같은 입력을 빨리 넘기는 것뿐

prompt caching은 이미 처리한 prefix를 다시 쓰게 도와줘. 뭐가 중요한지 정해주지도 않고, 오래 갈 사실을 보관해주지도 않고, 프로젝트의 기준을 갱신해주지도 않아. 성능을 위한 기능이지 기억 장치가 아니거든. 따뜻하게 데워진 cache는 기억처럼 느껴져. 만료되거나, prefix가 바뀌거나, 모형을 갈아 끼우기 전까지만. 그러면 환상이 걷혀.

층마다 제 일이 있어

cache는 반복되는 고정 입력. memory는 오래 갈 사실이랑 사용자 취향. handoff는 지금 작업 상태. retrieval은 pointer로 불러오는 원자료. window는 지금 하는 일. 이걸 헷갈리면 원인을 못 찾는 방식으로 system이 약해져.

흘러간 자리를 확인해

system이 뭔가를 '기억하는' 이유가 cache가 아직 따뜻해서뿐이라면, 잠복한 버그가 있는 거야. 확인법은 이래. cache를 비우고, session을 새로 열고, 그 사실이 여전히 나오나 봐. 안 나오면 그 사실은 진짜 집이 필요한 거야. 오래 가는 memory든 명시적인 handoff든. cache에 얹힌 context만으로는 안 돼.

따뜻한 cache는 기억처럼 느껴질 수 있어. 기억이 아니야.

Code

cache와 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"
차갑게 시작해보는 시험·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

AI 제품 아이디어 하나를 놓고 어떤 사실이 cache, memory, retrieval, handoff, 지금 쓰는 context 중 어디 속할지 정해봐. 그리고 머릿속으로 차갑게 시작해봐 — cache를 비우면 뭐가 남아?
Hint
그 사실이 내일까지 살아 있어야 한다면 그건 단순한 cache가 아니야.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.