/
Pack Hosting Panel

Varnish flushen

How to flush the varnish cache


Flushing the Varnish cache (also called purging) is done in several ways. To use the commands in dit article we presume the alisases as decribed in this article Varnish Basics are configured.

To flush varnish use the varnishadm command. see the examples below:

Everything

varnishadm "ban req.url ~ /"

Everything for 1 domain

varnishadm "ban req.http.host == example.com"

A specific URL

varnishadm "ban req.http.host == example.com && req.url == /some/url/"

Everything for 1 domain with the url starting with /trouser

varnishadm "ban req.url ~ /trouser"