varnish 4.0 官方文档翻译14-Built in subroutines
Built in subroutines vcl_recv 在接收到完整的客户端请求后调用这个子程序。它决定是否处理请求,怎样处理请求,使用哪一个后端。 它也可运用于修改请求,一些经常自己做的事情。 vcl_recv 子程序可以通过调用return()来结束,通过以下关键字: synth(status code, reason) Return a synthetic object with the specified status code to the client and abandon the request. 返回一个人为对象使用指定的状态码给客户端或者放弃请求。 pass Switch to pass mode. Control will eventually pass to vcl_pass. 处理跳转到vcl_pass pipe Switch to pipe mode. Control will eventually pass to vcl_pipe. 处理跳转到vcl_pipe hash Continue processing the object as a potential candidate for caching. Passes the control over to vcl_hash. 处理跳转到vcl_hash,在缓存中查找对象,如果有则为命中,