How to flush or clear varnish cache

QUESTIONS CENTRECategory: varnishHow to flush or clear varnish cache
ZENHOST Support Staff asked 7 years ago

If you are new to Varnish, here is what Wikipedia says about ti:

Varnish is an HTTP accelerator designed for content-heavy dynamic web sites. In contrast to other HTTP accelerators, such as Squid, which began life as a client-side cache, or Apache, which is primarily an origin server, Varnish was designed from the ground up as an HTTP accelerator.

 

If you are new to Varnish, here is what Wikipedia says about ti:

Well today I want to show you how to purge all the cache without the need to restart the daemon.

varnishadm -T 127.0.0.1:6082 url.purge .

That will flush the cache.

Also to re-load Varnish configuration, you have several commands:

Command Result
service varnish restart Completely restarts Varnish, using the operating system mechanisms. Your cache will be flushed.
service varnish reload Only reloads VCL. Cache is not affected.