---
title: "Work through a KV-cache allocation"
description: "Allocate a twelve-block cache as requests arrive, grow, and finish. Then account for a shared prefix without counting it twice."
canonical_url: "https://fanout.sh/ai-engineering/lessons/paged-attention-pdf"
md_url: "https://fanout.sh/ai-engineering/lessons/paged-attention-pdf.md"
access: "public"
---

# Work through a KV-cache allocation

Allocate a twelve-block cache as requests arrive, grow, and finish. Then account for a shared prefix without counting it twice.

---
This representation contains public Fanout content only. Protected Pro lessons, account data, billing, checkout, and pricing are not included.

Browse the public content map: https://fanout.sh/sitemap.md
