Ipstenu / varnish-http-purge

Proxy Cache Purge
Apache License 2.0
46 stars 48 forks source link

Multiple machines, need to add multiple domain names #37

Closed bsteinlo closed 6 years ago

bsteinlo commented 6 years ago

Have Varnish installed and working well. Recently upgraded infrastructure to have multiple machines/domains. Would like to request an option to put in more than one domain name.

Something like www1.xyz.com, www2.xyz.com www3.xyz.com

Ipstenu commented 6 years ago

You mean to have one domain (say www1.xyz.com) flush two or three other domains' caches?

The only possible use case I could think of there is a Multisite with mapped domains (or subdomains) where you'd want to flush the whole system cache at once, and if that's the case, it's beyond the scope of the plugin.

bsteinlo commented 6 years ago

Yeah, I have a non-multisite with multiple domains serving 1 site for load balancing and want to flush all of them, so basically changing the 'Configure Custom Varnish IP' to an array. Is that within scope?

Ipstenu commented 6 years ago

That would require a hell of a rewrite for a pretty weird situation that isn't even the best practice for load balancing (which would be one domain, multiple IPs). Horizontal scaling is a bit of a mess with WP anyway though...

But that rolls back to supporting multiple Varnish IPs, which I currently don't do because I don't have a good way to test that setup. I don't like to add 'unsupportable' aspects to my code, and since I can't dev or support multiple IPs at this time, I won't be adding that to the plugin. There are other plugins that can do what you're looking for though.