[3.0] 9ac381b Document vcl_init{} and vcl_fini{}
Tollef Fog Heen
tfheen at varnish-cache.org
Tue Aug 30 10:31:37 CEST 2011
commit 9ac381b8dec150fdff4a6cd52990e6ba7faa831a
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Aug 30 07:18:13 2011 +0000
Document vcl_init{} and vcl_fini{}
Fixes #990
diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst
index 4645cd1..4a211a1 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -62,7 +62,9 @@ depending on context one of
* error
* fetch
* hash
+* hit_for_pass
* lookup
+* ok
* pass
* pipe
* restart
@@ -382,6 +384,15 @@ decide how the request should be handled. Each subroutine terminates
by calling one of a small number of keywords which indicates the
desired outcome.
+vcl_init
+ Called when VCL is loaded, before any requests pass through it.
+ Typically used to initialize VMODs.
+
+ return() values:
+
+ ok
+ Normal return, VCL continues loading.
+
vcl_recv
Called at the beginning of a request, after the complete request has
been received and parsed. Its purpose is to decide whether or not
@@ -545,6 +556,16 @@ vcl_error
of restarts is higher than *max_restarts* varnish emits a guru meditation
error.
+vcl_fini
+ Called when VCL is discarded only after all requests have exited the VCL.
+ Typically used to clean up VMODs.
+
+ return() values:
+
+ ok
+ Normal return, VCL will be discarded.
+
+
If one of these subroutines is left undefined or terminates without
reaching a handling decision, control will be handed over to the
builtin default. See the EXAMPLES section for a listing of the
More information about the varnish-commit
mailing list