Posted about 5 years ago. Visible to the public.

Varnish Cache Clears

Clear for an entire domain:

Copy
varnishadm "ban req.http.host == www.mydomain.com"

Clear for a URL on a domain that starts with something, or ends with something (just regex, so change as you like):

Copy
varnishadm "ban req.http.host == www.mydomain.com && req.url ~ ^/some-directory" varnishadm "ban req.http.host == www.mydomain.com && req.url ~ .css$"

Clear for a specific URL:

Copy
varnishadm "ban req.http.host == www.mydomain.com && req.url == /some/specific/url"

Here is a nice cheatsheet for ya - http://kly.no/varnish/regex.txt

Owner of this card:

Avatar
Mike Whitby
Last edit:
about 5 years ago
Keywords:
ban
Posted by Mike Whitby to Magento
This website uses cookies to improve usability and analyze traffic.
Accept or learn more