When I programmatically update a product, all cached products (varnish) seem to be cleared. This is the header from the purge request:
ReqHeader X-Magento-Tags-Pattern: ((^|,)cat_p_3478(,|$))|((^|,)cat_p(,|$))
I think it's the cat_p tag that causes the clearing, but I don't understand why all pages tagged with this tag need to be cleared. This simple code triggers the purge request:
$product = $productRepository->get($data->sku); $product->setStoreId(0); $product->save();
What can I do to fix this?