2010/12/13 Stefan Pommerening <[email protected]>: > Am 13.12.2010 09:46, schrieb andan andan: >> >> 2010/12/10 Vitaly Burshteyn<[email protected]>: >>> >>> Hi folks, >>> >>> We use cookies to test if it's a returning visitor or not. Is there any >>> way to force a lookup on varnish if a specific cookie is present? >> >> http://www.varnish-cache.org/docs/2.1/reference/vcl.html >> >> Look at "..how to force Varnish to cache documents even when cookies >> are present::" > > Just to point you in the right direction (although reading the reference > documents _is_ necessary, too): > > in vcl_recv: > (example) > if (req.request == "GET" && req.http.cookie && req.http.cookie ~ "<regex>") > { > [ normalize cookie for reasonable caching / reduce variations (lower > number of objects in cache) ]
In the sake of good order, this piece of code doesn't affect the number of objects in cache. To vary the objects in cache in function of a cookie, you need to add the cookie to the "req.hash" in the "hash" section. Kind Regards. _______________________________________________ varnish-misc mailing list [email protected] http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
