What is the purpose of http_cache_hosts entry in app/etc/env.php?
To make Magento aware of the Varnish servers, add the following section to app/etc/env.php
. For Example:
'http_cache_hosts' =>
array (
0 =>
array (
'host' => 'varnish-0',
'port' => '80',
),
1 =>
array (
'host' => 'varnish-1',
'port' => '80',
),
),
In order to ensure the Varnish cache can be cleared, you must also add a node to your env.php
to tell Magento how to communicate with Varnish
I hope this will help