Bans vs. Purges (was RE: lurker?)

Lars Jørgensen lajo at
Thu Jun 30 12:59:44 CEST 2011

>> Is that really the case? According to the documentation, both concepts still exists. As I understand them, a ban
>> is a permanent filter, a purge is a deletion of cache object(s).

> No. Bans are not permanent. They are *lazy*. They are applied at a later time, when the relevant object is
> requested. If the object is *newer* than the ban the band doesn't apply.


Please walk me through an example like this:

1. User requests index.html, it's a miss, so varnish fetches it, stores it in the cache and delivers it
2. I ban index.html
3. User requests index.html. The current object in the cache is banned, so a new version is fetched, stored and deliverd
4. User requests index.html. There are two of those in the cache, but one is older than the ban, so it will not be served.

What is the purpose of banning an object when you could just delete it? The way I understand it, when a ban is in effect, multiple copies of the same object will exist in the cache, and varnish has to check a ban list to find out which ones to serve. Seems a convoluted way of doing things, but I suspect I'm missing a major point somewhere.

I'm sorry for wasting time if everybody else understands this, but it is puzzling to me.


More information about the varnish-misc mailing list