In data 18 febbraio 2010 alle ore 21:58:39, Alessandro Ronchi <[email protected]> ha scritto:
> This is my configuration file: > http://dpaste.com/161264/ Ciao Alessandro, I'm no expert, but I think your config file explicitly defeats caching when there is a cookie. 41 if (req.http.Authorization || req.http.Cookie) { > I've used > set req.hash += req.http.cookie; I would suggest explicitly matching the "django_language" cookie, setting a custom header with its contents, and then using that as a hash part, so: In vcl_recv(): set req.http.X-Cookie-Language = regsub(req.http.Cookie, "..."); In vcl_hash(): set req.hash += req.http.X-Cookie-Language; This is part of one config I'm using, the vcl_recv() bit: if (req.http.Cookie ~ "language=") { set req.http.X-Varnish-Language = regsub(req.http.Cookie, "^.*?language=([^;]*?);*.*$", "\1"); } The regexp above is probably overly complicated. I tried a couple of times to simplify it, but I always broke it. Suggestions welcome :) -- Cosimo _______________________________________________ varnish-misc mailing list [email protected] http://projects.linpro.no/mailman/listinfo/varnish-misc
