cancel
Showing results for 
Search instead for 
Did you mean: 

is it need to restart apache and varnish on server while clear magento cache ?

is it need to restart apache and varnish on server while clear magento cache ?

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 

4 REPLIES

Re: is it need to restart apache and varnish on server while clear magento cache ?

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

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: is it need to restart apache and varnish on server while clear magento cache ?

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?

Re: is it need to restart apache and varnish on server while clear magento cache ?

You do not need to restart varnish nor the web server.

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: is it need to restart apache and varnish on server while clear magento cache ?

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?