I have an install where all authentiated requests are served from a different subdomain than anonymous, and only auth users can vote or comment. This means that when comments/nodes/votes etc. are posted, the cache is flushed for foo-secure.example.com instead of www.example.com, which isn't very useful.
The only two places that _varnish_get_host() is used currently are in hook_expire() and varnish_purge_all_pages(), since those both need the host where the cache is set, not where it's being cleared from, I think it makes sense to add a variable for this.
What this wouldn't cover is the situation where you have a multilingual site using domain prefixes, or a site using domain access - where the same content is served via separate domains. That might need to allow this variable to be an array in that case, but I haven't thought about this too much yet.
| Comment | File | Size | Author |
|---|---|---|---|
| varnish_cache_base_url.patch | 1.48 KB | catch |
Comments
Comment #1
catch