<b>This week in caching: writing your first Varnish VCL without footguns</b>
A starter <code>default.vcl</code> walkthrough. Skip if you're fully on a CDN edge.
— <b>Strip tracking params in vcl_recv</b> — normalize or remove <code>utm_*</code>, <code>fbclid</code>, <code>gclid</code> so one page doesn't fragment into 50 cache objects.
— <b>Decide cookies deliberately</b> — by default Varnish won't cache anything with a Set-Cookie or request Cookie; whitelist only your real session cookie, drop the rest in vcl_recv.
— <b>Honor a bypass</b> — pass through wp-admin, cart, and checkout paths explicitly; full-page caching a logged-in dashboard leaks data between users.
— <b>Set a sane TTL with grace</b> — <code>set beresp.ttl = 1h; set beresp.grace = 6h;</code> so a slow origin still serves stale-but-fast.
— <b>Test with varnishlog</b> — confirm hits show <code>VCL_call HIT</code>, not silent passes.
Credit to the Varnish Book authors for the grace-mode pattern.
<b>Bookmark:</b> the official Varnish 'Getting Started' VCL — the cleanest annotated baseline.
—
Соседний канал в сети: @affcareers_limassol
Cache Catch
@CacheCatch
<b>This week in caching: writing your first Varnish VCL without footguns</b>
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.