On Wed, May 23, 2012 at 6:41 AM, <[email protected]> wrote:
> I'm trying to setup varnish for a multi-language vbulletin forum. The
> language is set through a cookie (bblanguageid).
>
> My current configuration is: http://pastebin.com/wCKZUcTX
By the way, I don't think you can redefine VCL functions multiple
times as you do in this configuration. It will consider only the first
definition.
> Now I've tried to cache a separate version if the bblanguageid=2 cookie is
> present:
>
> sub vcl_hash {
> if (req.http.cookie ~ "bblanguageid=2") {
> set req.hash += "deDE";
> }
> }
I do this very frequently (but with Varnish 3.0.2). The idea is the
same, but I use hash_data to add the custom string "deDE". Here, the
only thing you really need is this configuration. With this, varnish
must be generating a different cache entry for this request with the
cookie.
To know exactly what is happening, you must use 'varnishlog' command
and look at what varnish is doing, if it's adding the custom hash, and
so on.
--
[]'s
Hugo
www.devin.com.br
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc