From 5492da0ce671c22f34c095bbf26304c255b84864 Mon Sep 17 00:00:00 2001 From: des Date: Mon, 25 Jun 2007 15:54:22 +0000 Subject: [PATCH] Document vcl_discard(). git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1567 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/man/vcl.7 | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/varnish-cache/man/vcl.7 b/varnish-cache/man/vcl.7 index 8ecd0799..bfffcaa8 100644 --- a/varnish-cache/man/vcl.7 +++ b/varnish-cache/man/vcl.7 @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd March 28, 2007 +.Dd June 25, 2007 .Dt VCL 7 .Os .Sh NAME @@ -285,8 +285,8 @@ Insert the object into the cache, then deliver it to the client. .El .\" vcl_timeout .It Cm vcl_timeout -Called by the reaper thread when a cached document has reached its -expiry time. +Called by the reaper thread shortly before a cached document reaches +its expiry time. .Pp The .Cm vcl_timeout @@ -297,6 +297,21 @@ Request a fresh copy of the object from the backend. .It Cm discard Discard the object. .El +.\" vcl_discard +.It Cm vcl_discard +Called by the reaper thread when a cached document is about to be +discarded, either because it has expired or because space is running +low. +.Pp +The +.Cm vcl_discard +subroutine may terminate with one of the following keywords: +.Bl -tag -width "discard" +.It Cm discard +Discard the object. +.It Cm keep +Keep the object in cache. +.El .El .Pp If one of these subroutines is left undefined or terminates without @@ -408,6 +423,10 @@ sub vcl_fetch { insert; } +sub vcl_discard { + discard; +} + sub vcl_timeout { discard; } -- 2.39.5