ignore query param in req.hash
Poul-Henning Kamp
phk at phk.freebsd.dk
Sat Jul 9 07:39:16 CEST 2011
In message <CANZWjw4M_yPYcAkfvJLrjmfkuVvbuYkirS8Xq4crGAtkAZROJQ at mail.gmail.com>
, AD writes:
>what is the cleanest way to ignore a single query param in the cache key
>(req.hash) without having to modify req.url ?
Use regsub() to strip it, something like:
hash_data(regsub(req.url, "[?].*", ""));
--
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