Cache invalidation (not PURGE)

Laurence Rowe l at
Wed Jan 20 23:18:34 CET 2010

2010/1/19 Antoni Villalonga <antonivillalonga at>:
> Hi!
> I'm looking for a method to invalidate some url.
>, for example.
> If I PURGE using 'purge()' function and 2 diferent users GET
> "" at time, varnish ask for the url to the
> backend server twice.
> When a url cache expires, and 2 diferent users GET the url at time, varnish ask
> only one time to the backend and serve an expired version to the "second" user.
> (yes, we use "grace time").
> In short, I also want to use "grace time" when urls are "purged".

There are two ways to invalidate objects, purge(expression); and set
obj.ttl = 0; If you use the second form you should get the behaviour
you want. Note that if you use Vary: you must purge each vary with a
separate request.


More information about the varnish-misc mailing list