My Varnish project

admin admin at
Tue May 29 12:18:58 CEST 2007

Poul-Henning Kamp wrote:
> In message <465BF076.9030804 at>, admin writes:
>> 2) Cook up some VCL code to cache pages on a per-session basis, by
>> appending the req.http.Cookie value to the URL before it is stored in
>> the cache, and then doing the same thing when looking up the cache. VCL
>> does not easily allow this to happen though ???? Correct me if I am wrong.
> Actually, we just added a facility to do this:
> 	vcl_hash {
> 		req.hash += req.http.cookie;
> 	}
> It will (not yet) do the right thing if there are multiple cookie
> header lines, but that is in the works.
Excellent - I am on gentoo, using varnish-1.0.4

The man pages for VCL do mention a vcl_hash interface, but it says it's
not implemented yet. Wasnt sure what it was, but I assume that is called
whenever the hash value for the key of the object is calculated ? 

That would be before every insert command, and before every lookup
command ?  In that case, its exactly what I need. I notice that req.hash
is not mentioned in the man pages either.

Will make sure that I have the latest version and have a play again. 
Actually - it wont take a minute, and its all quiet here now (8pm in
Australia), so Ill try it on the production servers now .. :)


More information about the varnish-misc mailing list