On Tuesday, November 6, 2012 at 4:22 PM, Tim Starling wrote:

> Maybe it would be possible to vary on the value of the ULS language
> cookie, but it would require patches to Squid and Varnish.

I don't know about Squid, but there are all manner of ways you could attack 
this problem with Varnish. Overriding vcl_hash lets you customize how a cache 
key is constructed from a request. It's usually just hostname + URL, but you 
can add any string to the hash:


sub vcl_hash {
    if (req.http.Cookie ~ "language") {
        hash_data(regsub(req.http.Cookie, "^.*(language=[^;]+).*$", "\1"));
    }
}



--
Ori Livneh
o...@wikimedia.org



_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to