Cache dynamic pages based on some (and not all) query parameters?

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Feb 2 15:20:58 CET 2009


In message <1233581275.11992.75.camel at rant-e-minor>, Matko Bregovic writes:
>Hi,
>
>I wonder if it's possible to cache pages based on some query parameters.
>
>All (GET) query parameters for search.jsp, but 'search.x=', 'search.y='
>and 'random=' should be part of the cache key uniqueness.

You decide your own lookup string in vcl_hash, so just don't use
the entire req.url, but only the bits you want.


-- 
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