r5068 - trunk/varnish-cache/doc/sphinx/reference

kristian at varnish-cache.org kristian at varnish-cache.org
Mon Aug 2 21:46:49 CEST 2010


Author: kristian
Date: 2010-08-02 21:46:49 +0200 (Mon, 02 Aug 2010)
New Revision: 5068

Modified:
   trunk/varnish-cache/doc/sphinx/reference/vcl.rst
Log:
Clean up obj/beresp left overs in vcl(7).


Modified: trunk/varnish-cache/doc/sphinx/reference/vcl.rst
===================================================================
--- trunk/varnish-cache/doc/sphinx/reference/vcl.rst	2010-08-02 19:36:28 UTC (rev 5067)
+++ trunk/varnish-cache/doc/sphinx/reference/vcl.rst	2010-08-02 19:46:49 UTC (rev 5068)
@@ -537,11 +537,31 @@
   The time in seconds to wait between each received byte from the
   backend.  Not available in pipe mode.
 
-XXX: Aren't these beresp now?
-
 The following variables are available after the requested object has
-been retrieved from cache or from the backend:
+been retrieved from the backend, before it is entered into the cache. In
+other words, they are available in vcl_fetch:
 
+beresp.proto
+  The HTTP protocol version used when the object was retrieved.
+
+beresp.status
+  The HTTP status code returned by the server.
+
+beresp.response
+The HTTP status message returned by the server.
+
+beresp.cacheable
+  True if the request resulted in a cacheable response.  A response is
+  considered cacheable if it is valid (see above), and the HTTP status
+  code is 200, 203, 300, 301, 302, 404 or 410.
+
+beresp.ttl
+  The object's remaining time to live, in seconds.
+
+After the object is entered into the cache, the following (mostyl
+read-only) variables are available when the object has been located in
+cache:
+
 obj.proto
   The HTTP protocol version used when the object was retrieved.
 
@@ -601,7 +621,7 @@
 
   sub vcl_fetch {
     # Don't cache cookies
-    remove obj.http.Set-Cookie;
+    remove beresp.http.Set-Cookie;
   }
 
 EXAMPLES
@@ -650,8 +670,8 @@
   which the backend did not specify a TTL:::
   
   sub vcl_fetch {
-    if (obj.ttl < 120s) {
-      set obj.ttl = 120s;
+    if (beresp.ttl < 120s) {
+      set beresp.ttl = 120s;
     }
   }
 




More information about the varnish-commit mailing list