Skip to content

How to empty Varnish cache

Using you CMS

Most CMS'es have a built-in option or a plug-in to manage (Varnish) cache settings.

Using varnishadm

First you will need to contact our support department at support@sre.combell.com to obtain the varnish secret key.
This secret key will have to be written to a file on the server.

The command you can use to retrieve a specific domain from the Varnish cache is the following:(keep in mind that you may have to do this for different TLDs)

varnishadm -S ~/varnish_secret -T 127.0.0.1:6082 ban req.http.host ~ <..FQDN HERE (without www)..>

  • To specify specific paths, you can run a similar command (keep in mind that you may have to do this for different TLDs that the domain owns):
varnishadm -S ~/varnish_secret -T 127.0.0.1:6082 ban req.http.host ~ <..FQDN HERE (without www)..> && req.url ~ /path/
  • If you wish to use the varnishadm console, you can use:
    varnishadm -S ~/varnish_secret -T 127.0.0.1:6082
    

More information about what can be done in the varnish console can be found in the Varnish documentation: