r1155 - trunk/varnish-cache/man

des at projects.linpro.no des at projects.linpro.no
Tue Oct 17 14:44:48 CEST 2006

Author: des
Date: 2006-10-17 14:44:48 +0200 (Tue, 17 Oct 2006)
New Revision: 1155

Additional details about global variables.

Modified: trunk/varnish-cache/man/vcl.7
--- trunk/varnish-cache/man/vcl.7	2006-10-13 08:04:07 UTC (rev 1154)
+++ trunk/varnish-cache/man/vcl.7	2006-10-17 12:44:48 UTC (rev 1155)
@@ -165,10 +165,49 @@
 See the
 section for a listing of the default code.
-.Ss Objects
+.Ss Variables
 Although subroutines take no arguments, the necessary information is
-made available to the handler subroutines through global objects.
-.\" Document these objects...
+made available to the handler subroutines through global variables.
+The following variables are available in backend declarations:
+.Bl -tag -width 4n
+.It Va backend.host
+Host name or IP address of a backend.
+.It Va backend.port
+Service name or port number of a backend.
+The following variables are available while processing a request:
+.Bl -tag -width 4n
+.It Va client.ip
+The client's IP address.
+.It Va req.request
+The request type (e.g. "GET", "HEAD").
+.It Va req.url
+The requested URL.
+.It Va req.proto
+The HTTP protocol version used by the client.
+.It Va req.backend
+The backend to use to service the request.
+.It Va req.http. Ns Ar header
+The corresponding
+.Ar header
+from the HTTP request.
+The following variables are available after the requested object has
+been retrieved from cache or from the backend:
+.Bl -tag -width 4n
+.It Va obj.valid
+True if the object was successfully retrieved.
+.It Va obj.cacheable
+True if the object is cacheable.
+.\" XXX what are the criteria?
+.It Va obj.ttl
+The object's time to live.
+.\" .It Va resp.http. Ns Ar header
+.\" XXX not implemented?
 The following code is the equivalent of the default configuration with
 the backend address set to "backend.example.com" and no backend port

More information about the varnish-commit mailing list