Take your Http caching to the next level with xkey & Fastly
summary
FOSHttpCache integrates Symfony with Varnish xkey secondary index and can target Fastly via its API, enabling tag-based invalidation and soft-grace serving (stale content served while a background refresh runs). Demo uses a Symfony flex app, VCL plus varnishlog to show headers like X-Key: post:452 and that soft-purge expired 2–3 cached variations instead of wholesale purges. Setup runs in Docker with nginx and varnish; result is higher cache hit ratio and faster page delivery when configured.
AI-written summary · about
chapters (13)
- 0:00Introduction to advanced HTTP caching
- 1:06Background and speaker introduction
- 3:40Theory behind cache tagging
- 6:10What is Xkey and how it works
- 8:19Fastly and its Xkey support
- 9:25VCL configuration for Xkey
- 13:44Symphony integration with Xkey
- 18:53Tagging with annotations in Symphony
- 20:18Debugging with Varnish log
- 26:01Advanced cache invalidation in Fastly
- 27:24Caching user context in Varnish
- 30:33Configuring user context in Fastly
- 32:02Q&A: Cache tag naming advice
related talks
38mThe power of cache in a slow world
39mCaching the Uncacheable
25mCaching strategies on https://dev.to
47mCaching strategies on https://dev.to
28mTaking Laravel to the edge with HTTP caching & Varnish
28mCaching the uncacheable in Varnish
58mCaching the uncacheable: delivering personalized experiences without sacrificing performance
38mHTTP Headers that Make Your Website Go Faster
