Purgin when obj.ttl = 0

Nuno Neves nfn at gmx.com
Fri Jun 10 18:03:10 CEST 2011


Hello,

 I run varnish 2.1 and my front page is cached for 300s.
 I would like to purge this page when the object expires.

 I placed this in vcl_hit:

 sub vcl_hit {
 if (obj.ttl < 1s) {
 set obj.ttl = 0s;
 error 200 "Purged.";
 }
 }

 Is this correct?
 Can obj.ttl be negative or when it's expired will be = 0?

 Thanks

 Nuno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110610/8c2e95ce/attachment-0003.html>


More information about the varnish-misc mailing list