<html><head></head><body><div style="color:black;font-size:14px">Hello.<br></div><div style="color: black;font-size: 14px;">I'm new to varnish and I have a question concerning how to manage multiple sites using the same varnish cache frontend.<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">More specifically, I need to setup a single varnish cache server for two different Magento2 sites.<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">Looking around I found that it is possible to manage different backends using something like:<br></div><div style="color: black;font-size: 14px;"><br></div><blockquote style="border-left: 2px solid rgb(168, 168, 168); padding-left: 10px; margin-top: 0.5rem; margin-block-start: 0px; margin-inline-start: 0px;"><div style="color: black;font-size: 14px;">if (req.http.host == "somesite") {<br></div><div style="color: black;font-size: 14px;"> set req.backend_hint = somebackend;<br></div><div style="color: black;font-size: 14px;"> }<br></div></blockquote><div style="color:black;font-size:14px" class="signature">Now, I have two different Magento2 sites and, using the above expression, I can handle the two different backends.<br></div><div style="color: black;font-size: 14px;">The problem is that I can't understand how to handle the PURGE/BAN of the two independently.<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">As far as I understand from the .vcl file that Magento2 itself produces there is nothing inside the "purge" section that specifies which resources must be purged.<br></div><div style="color: black;font-size: 14px;">It seems to me that is site A performs a purge, than also the cache of site B resources will be cleaned.<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">Can you help me with this or point me to some example or tutorials?<br></div><div style="color: black;font-size: 14px;"><br></div><div style="color: black;font-size: 14px;">Thanks a lot<br></div><div style="color: black;font-size: 14px;">Riccardo <br></div></body></html>