# Task 02 — Caching middleware + wiring + integration tests **Phase:** `33_cache_busting` · **Source:** `TODO.md:6 — "the pages are too sticky" (HTML revalidation + versioned asset URLs + immutable assets)` **Story:** `.agent/user_stories/cache-busting.md` ## Objective Apply the caching behavior at the transport layer: HTML pages `no-cache` with `?v=` on every local asset reference; `/assets/*` immutable 1-year; everything else (all `/api/*`, including SSE) untouched. ## Work 1. `app/core/caching.py` (extend task 01's module): - `HTML_PAGES: tuple[str, ...] = ("/", "/index.html", "/sources.html", "/document.html", "/login.html", "/tuning.html")`. - `_ASSET_REF_RE = re.compile(r'((?:href|src)="(?:/)?assets/[^"?#]+)(")')` — matches ``, `` (no leading slash!), and `