So i am using varnish for the first time. i have spent quite some time reading on how it works, but i am unable to figure out how do i selectively purge the cache.
like say i have a url like this
/?account=123&url=google.com
and another like
/?account=123&url=stackoverflow.com
I need to purge the cache where account=123
.
I can only figure out that issuing purge on
/?account=123&url=stackoverflow.com
will only purge the cache where the url matches the incoming url with PURGE method.
Any help is appreciated.
So this is what works. In varnish 3 selective purge is called ban. so you need to use
ban("obj.http.x-url ~ " + req.url);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With