Server: Apache2
Magento Version: 2.1.9
Varnish Version: 4
I installed varnish on the server and also configured on Magento 2 backend.
I also set up cache host using this command : php bin/magento setup:config:set --http-cache-hosts=xx.xx.xx.xx:6081
so if I clear cache from Magento using CLI or backend than it automatically removed varnish cache also, right?
If yes then can I need to restart apache and varnish service also?
Please suggest me
Here's documentation on varnish cache, what will purge it and how to make sure that clearing magento cache even on command line will also purge varnish http://devdocs.magento.com/guides/v2.0/config-guide/varnish/use-varnish-cache.html
Thanks for reply,
Yes, we configured all regarding varnish properly into server and also into Magento 2 backend as per http://devdocs.magento.com/guides/v2.0/config-guide/varnish/use-varnish-cache.html
But, our Sys. Administrator said that, If I flush from Magento Cache from backend than it will automatically clear varnish cache also from the server but after that, you just need to restart varnish service and also restart apache service from the server.
so is it right?
You do not need to restart varnish nor the web server.
Thanks for reply,
It means that, If I clear Magento cache from backend or through CLI that it automatically clear varnish cache and in frontend and backend updated value shows directly without run restart varnish and apache from the server, right?