SOURCES: varnish.conf - update from varnish-1.0.4/etc/default.vcl

glen glen at pld-linux.org
Mon Jul 2 13:50:48 CEST 2007


Author: glen                         Date: Mon Jul  2 11:50:48 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- update from varnish-1.0.4/etc/default.vcl

---- Files affected:
SOURCES:
   varnish.conf (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/varnish.conf
diff -u SOURCES/varnish.conf:1.1 SOURCES/varnish.conf:1.2
--- SOURCES/varnish.conf:1.1	Fri Dec  1 10:10:23 2006
+++ SOURCES/varnish.conf	Mon Jul  2 13:50:43 2007
@@ -5,27 +5,84 @@
 # $Id$
 #
 
-backend default {
-        set backend.host = "127.0.0.1";
-        set backend.port = "8080";
-}
-
-sub vcl_recv {
-	# pass mode can't handle POST (yet)
-        if (req.request == "POST") {
-                pipe;
-        }
+# Default backend definition.  Set this to point to your content
+# server.
 
-        # force lookup even when cookies are present
-        if (req.request == "GET" && req.http.cookie) {
-                lookup;
-        }
+backend default {
+	set backend.host = "127.0.0.1";
+	set backend.port = "8080";
 }
 
-sub vcl_fetch {
-        # force minimum ttl of 180 seconds
-        if (obj.ttl < 180s) {
-                set obj.ttl = 180s;
-        }
-}
+# Below is a commented-out copy of the default VCL logic.  If you
+# redefine any of these subroutines, the built-in logic will be
+# appended to your code.
 
+## Called when a client request is received
+#
+#sub vcl_recv {
+#	if (req.request != "GET" && req.request != "HEAD") {
+#		pipe;
+#	}
+#	if (req.http.Expect) {
+#		pipe;
+#	}
+#	if (req.http.Authenticate || req.http.Cookie) {
+#		pass;
+#	}
+#	lookup;
+#}
+#
+## Called when entering pipe mode
+#
+#sub vcl_pipe {
+#	pipe;
+#}
+#
+## Called when entering pass mode
+#
+#sub vcl_pass {
+#	pass;
+#}
+#
+## Called when entering an object into the cache
+#
+#sub vcl_hash {
+#	hash;
+#}
+#
+## Called when the requested object was found in the cache
+#
+#sub vcl_hit {
+#	if (!obj.cacheable) {
+#		pass;
+#	}
+#	deliver;
+#}
+#
+## Called when the requested object was not found in the cache
+#
+#sub vcl_miss {
+#	fetch;
+#}
+#
+## Called when the requested object has been retrieved from the
+## backend, or the request to the backend has failed
+#
+#sub vcl_fetch {
+#	if (!obj.valid) {
+#		error;
+#	}
+#	if (!obj.cacheable) {
+#		pass;
+#	}
+#	if (resp.http.Set-Cookie) {
+#		pass;
+#	}
+#	insert;
+#}
+#
+## Called when an object nears its expiry time
+#
+#sub vcl_timeout {
+#	discard;
+#}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/varnish.conf?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list