I like to keep the below two snippets so that I can purge a specific page from varnish or a range by a prefix.
Purge Specific Page from Varnish :
1 |
varnishadm -T 127.0.0.1:6082 -S /etc/varnish/secret ban "req.http.host == www.example.com && req.url == /your/url/path"; |
Purge range of url by a Prefix :
1 |
varnishadm -T 127.0.0.1:6082 -S /etc/varnish/secret ban "req.http.host == www.example.com && req.url == '^/some/generic/prefix'"; |