According to magento Devdocs for Varnish cleaning
If you have configure in env.php
--http-cache-hosts parameter magento can clean Varnish cache from admin like it clean its internal caches.
This is done as mentioned when:
- Maintaining a website.
For example, anything you do in the Admin in:
STORES > Settings > Configuration > GENERAL > General
STORES > Settings > Configuration > GENERAL > Currency Setup
STORES > Settings > Configuration > GENERAL > Store Email Addresses
When Magento detects such a change, a message displays informing you to refresh the cache. To do this, see Refresh the Magento cache.
- Maintaining a store (for example, adding or editing categories, prices, products, and promotional pricing rules). Varnish is purged automatically when you perform any of these tasks.
Again like Devdocs saying
My question is this as I don't understand exactly:
In section 2 in DevDocs they say that
Varnish is purged automatically when you perform any of these tasks.
So When you actually work in admin like editing a product and change its price or name or something like this how magento handle the auto Varnish clean?
It cleans whole varnish cache like when you hit is server terminal :
service varnish restart
or it purges the specific product you just edited?
I haven't understood this function completely. If you someone could explain it better please with the files in magento core which are responsible for this.
I am asking this because we work in admin a lot, changing prices or attributes in products. And because we have a large catalog we don’t want every time we edit a product magento to clean whole varnish as this affect our speed