On Thu, Dec 16, 2010 at 2:30 PM, Stefan Pommerening <[email protected]> wrote:
> > of couse you only need one single vcl_recv subroutine. This applies to all > vcl subroutines. > I usually start with grabbing the default vcl and then add everything I > need to the existing (default) subroutines. > > 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. > Actually, multiple definitions of the same subroutine is allowed. They are then concatenated, the flow being terminated only by the return statements. This is how the default VCL get overridden by your custom VCL. There is a good example in the man vcl. Of course, this might get very confusing when you have multiple vcl_recv subroutines spread over several included files. Caution advised. :-) -- Per Buer, Varnish Software Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer Varnish makes websites fly! Want to learn more about Varnish? http://www.varnish-software.com/whitepapers
_______________________________________________ varnish-misc mailing list [email protected] http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
