I'm trying to determine if its possible to clear the Magento 2.2.6 EE caches at certain levels on our multi-website setup. We're using the built in full page caching, and we're using file storage, not database storage (but could change if needed). I'm looking for a programmatic solution since we have a custom admin interface we could implement this on. Here are the questions I'm trying to get answered.
1.) Can I clear caches related to a specific product, on one or more websites that product exists on?
2.) Can I clear a category page cache for a specific website, or all websites?
3.) Can I clear all caches for a specific website?
Hello @joseph_digiovanna
1.) Can I clear caches related to a specific product, on one or more websites that product exists on? : it you save any product automatically it will clear cache for each website.
https://github.com/magento/magento2/tree/2.3-develop/app/code/Magento/CacheInvalidate/etc
responsible for this.
2.) Can I clear a category page cache for a specific website, or all websites? : it will do cache flush for all website wise.
Magento save cache based on category Id, if you save category Id then it will flush cache for that category Id
3.) Can I clear all caches for a specific website? : no you need to flush cache by tags.
for 3 point, may be possible for varnish.
Hope it will help you. if help you then mark as a solution.
Hello @joseph_digiovanna
1.) Can I clear caches related to a specific product, on one or more websites that product exists on? : it you save any product automatically it will clear cache for each website.
https://github.com/magento/magento2/tree/2.3/develop/app/code/Magento/CacheInvalidate/etc
responsible for this.
2.) Can I clear a category page cache for a specific website, or all websites? : it will do cache flush for all website wise.
Magento save cache based on category Id, if you save category Id then it will flush cache for that category Id
3.) Can I clear all caches for a specific website? : no you need to flush cache by tags.
for 3 point, may be possible for varnish.
Hope it will help you. if help you then mark as a solution.