This week in caching: Varnish VCL that earns its keep
Four VCL snippets worth stealing:
— Cache-key normalization — stripping marketing query params (utm_*, fbclid, gclid) in vcl_hash so one page isn't cached 40 ways; instant hit-rate win.
— Grace mode done right — keeping objects in grace so a slow backend never shows a user an error; the config most defaults get wrong.
— Cookie handling — why a single analytics cookie tanks your hit ratio and how to sanitize Set-Cookie before vcl_recv.
— Ban vs purge vs xkey — the practical differences for selective invalidation at scale.
Credits: the Varnish Software docs and Thijs Feryn's talks.
Bookmark: the query-param normalization snippet — five lines, often doubles hit rate.
Cache Catch
@CacheCatch
This week in caching: Varnish VCL that earns its keep
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.