Blue background with pattern

Magento 2 × Varnish: Shaping the Future of Caching Together

Magento 2 × Varnish: Shaping the Future of Caching Together
Peter Jaap Blaakmeer 26 May 2025

Last week, elgentos organised the Varnish Taskforce meeting at the PHPro offices in Kontich (Belgium), bringing together Magento developers, hosting experts, devops engineers, and Varnish experts for two days of deep technical collaboration.

We dissected the Varnish built-in VCL, stripped legacy baggage, and rethought Magento’s Varnish integration from the start till the end. The result? A cleaner, smarter, and more configurable VCL approach, plus the new elgentos/magento2-varnish-extended extension—designed to generate VCL dynamically from Magento settings.

Highlights:

  • Implemented soft-purging support
  • Added many configuration options to dynamically generate the VCL
  • Leaner, modernized VCL
  • New VCL generator with if/else & foreach syntax
  • Configurable purge behavior, static/media caching, and more
  • VTL test suite + admin feedback on purges

    Huge thanks to all attendees for the brainpower and coding skills. We’re pushing this upstream to both Magento 2 and Mage-OS. Let's make Varnish smarter, faster, cleaner for everyone.