On Thu, Dec 16, 2010 at 02:30:17PM +0100, Stefan Pommerening wrote: > If you use the include statement you have to keep in mind that > inclusion is a textual substitution - therefore no repeated definition of > vcl_recv (or even other subroutines) is allowed.
This is incorrect. You can define all routines as many times as you want. They are executed in the order they are included and - most importantly - they STOP executing at the first return(). The very last VCL "included" is the default VCL - that is why you do not need to copy the logic on the default VCL unless you are planning on return()ing in your custom VCL: unless you issue return(), VCL execution continues until all (including the default) variants of a subroutine is executed. If you define include inside of vcl_recv, then you can not have any sub's in the included file. The reason is simple: you can't define vcl_recv inside vcl_recv. - Kristian
signature.asc
Description: Digital signature
_______________________________________________ varnish-misc mailing list [email protected] http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
