vmod_purge

Varnish Purge Module

Manual section:3

SYNOPSIS

import purge [from "path"] ;

CONTENTS

hard

INT hard()
Description
This is equivalent to return(purge) but explicitly called from vcl_hit and vcl_miss. It returns the number of purged objects.
Example
set req.http.purged = purge.hard();

soft

INT soft(DURATION ttl=0, DURATION grace=-1, DURATION keep=-1)
Description
Sets the TTL, grace and keep. By default, TTL is set to 0 with grace and keep periods left untouched. Setting a negative value for grace or keep periods leaves them untouched. Setting all three parameters to 0 is equivalent to a hard purge. It can only be called from vcl_hit or vcl_miss. It returns the number of soft-purged objects.

SEE ALSO