How to purge Varnish cache

Valic —  August 10, 2011 — 3 Comments

If you’re new varnish user, this is some words about varnish:

Varnish is an HTTP accelerator designed for content-heavy dynamic web sites. Unlike other HTTP accelerators, such as squid, which began as a cache on the client, or Apache2, which is mainly an origin server, Varnish was designed from the ground up as an HTTP accelerator..

Now I will show you how to purge all the cache without restarting the daemon.
The following coomand will do this for you:

varnishadm -T url.purge .*



Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

3 responses to How to purge Varnish cache

  1. Hi,
    What should url.purge . be . or something or a file path to a specific file. Sorry new to Varnish
    Using the exact syntax above I get

    Rejected 400
    CLI communication error (hdr)

  2. Use the command as it is. the .* means all urls

  3. Hi Valic, even on adding .* doesnt clear the caches and it gives reponse:
    Rejected 400
    CLI communication error (hdr)

    Follow steps as here, this works.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.