Varnish for multiple magento sites
Riccardo Brunetti
riccardo.brunetti at host.it
Tue Jul 11 11:13:01 UTC 2023
Hello.
I'm new to varnish and I have a question concerning how to manage multiple sites using the same varnish cache frontend.
More specifically, I need to setup a single varnish cache server for two different Magento2 sites.
Looking around I found that it is possible to manage different backends using something like:
> if (req.http.host == "somesite") {
>
> set req.backend_hint = somebackend;
>
> }
Now, I have two different Magento2 sites and, using the above expression, I can handle the two different backends.
The problem is that I can't understand how to handle the PURGE/BAN of the two independently.
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.
It seems to me that is site A performs a purge, than also the cache of site B resources will be cleaned.
Can you help me with this or point me to some example or tutorials?
Thanks a lot
Riccardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20230711/607e72f9/attachment.html>
More information about the varnish-misc
mailing list