Purge object transparently

spaceman spaceman at antispaceman.com
Wed Jul 16 11:17:32 CEST 2014


Hi,

Since the purge keyword was removed in Varnish 4.1 I have been looking for a way
to purge an object transparently. The VCL I need to be able to replace is:

sub vcl_hit {
    # purge cache when no-cache header present
    if ( req.backend.healthy && !req.http.User-Agent ~ "(B|b)ot" && req.http.Cache-Control ~ "no-cache" ) {
        purge;
    }
}

return(purge) is useless as I don't want a page telling me my object has been
purged just the refreshed object. Obviously req.backend.healthy will be replaced
with std.healthy(req.backend_hint).

Any ideas?

Regards,
spaceman

!DSPAM:53c6432d7583086614493!





More information about the varnish-misc mailing list