in my setup, I need to clear varnish caching at the server at all time even I make small changes then also need to clear the varnish cache at the server side
so can anyone help me with this?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityYou need to follow Magento 2 devdocs as they told step-to-step setting and configuration of varnish cache.
If you have already installed varnish cache on your server then you need to configure Port in the admin of Developer section then you will require to final verification that it's working or not as per the below guideline of Devdoc Magento 2: https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish-final.html
Full configuration Guide: https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish.html
As per Magento Docs, you can also check that Varnish cache working or not as per the below steps:
Make sure the /var/page_cache directory is empty:
Step 1: Log in to your Magento server, or switch to, the Magento file system owner.
Step 2: Clear page_cache manually with the below command
rm -rf /var/page_cache/*
Step 3: Access one or more cacheable Magento pages by navigating some pages randomly.
Step 4: Check the var/page_cache/ directory.
If the directory is empty, congratulations! You successfully configured Varnish and Magento to work together! If you cleared the var/page_cache/ directory, restart Varnish.