Caching pages with cookies - feature request

Klaus red5 at klaus.dk
Wed Sep 12 20:11:05 CEST 2007


Ah great!

But what if I only want to cache on some of the cookies. Like a 
sessionID  and ignore the rest?

/Klaus

Poul-Henning Kamp wrote:
> In message <46DABC11.9090608 at klaus.dk>, Klaus writes:
>   
>> Hello List,
>>
>>
>> Could it be possible to cache pages per cookie values?
>>
>> Example.
>>
>> http://www.host.dk/page1?var=value1   (cookie: selection=1,2,3,4)
>>     
>
> Yes, just add the cookie header to the hash string in vcl_hash():
>
> 	sub vcl_hash {
> 		set req.hash += req.http.cookie;
> 	}
>
>
> Poul-Henning
>
>   




More information about the varnish-misc mailing list