How prompt caching works - Paged Attention and Automatic Prefix Caching plus practical tips
sankalp.bearblog.dev·5w·
💬Prompt Engineering
Preview
Report Post
  • 30 Nov, 2025 *

Table of Contents

Intro Lore and Motivation - Yapping about why I wrote this post and giving a brief on territory we are about to venture in 1.

Tips to hit prompt cache more consistently - Why prompt caching matters and how to improve cache hits 1.

LLM inference basics - Prefill, decode, and KV caching fundamentals 1.

The memory problem - Why naive KV cache allocation doesn’t scale 1.

Paged attention - vLLM’s OS-inspired solution with blocks and block tables 1.

Prefix caching - Block hashing, longest cache hit, and the full picture

Prerequisite: Sections 2 onwards assumes familiarity with self-attention in deco…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help