Varnish Magento2 Configuration¶
- Install Varnish on the server
- Acquire a Magento VCL file using
- Store the VCL file in
- Enable use of Varnish cache in Admin > Stores > Configuration > System > Full Page Cache > Caching Application
update core_config_data set value = 2 where path = "system/full_page_cache/caching_application"
- Check the Varnish Configuration section's connection details
- Check HTTP headers for
Large Header size issues can be potentially solved looking here
Increasing the workspace size can cause varnish to run out of memory. This can be confirmed by running the following
varnishlog | grep abandoned
If you see the following, then varnish has panicked.
- The workspace needs to be big enough for the largest category to fit comfortably within it
- Customise Magento to make the headers smaller