Caching pages with cookies - feature request
Poul-Henning Kamp
phk at phk.freebsd.dk
Mon Sep 3 11:04:17 CEST 2007
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
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-misc
mailing list