Varnish配置文件VCL中的函数详解

 


vcl_recv()
  Called after a request is received from the browser, but before it is processed.
     接收到浏览器请求后,在处理请求之前调用此函数

vcl_pipe()
  Called when a request must be forwarded directly to the backend with minimal handling by Varnish (think HTTP CONNECT)
     当请求以varnish最小的处理而必须直接转交给后端服务时调用此函数

vcl_hash()
  Called to determine the hash key used to look up a request in the cache.
     当确定为请求的数据进行缓存指定哈希key时,调用此函数

vcl_hit()
  Called after a cache lookup when the object requested has been found in the cache.
     当在缓存中找到所要请求的数据时调用此函数

vcl_miss()
  Called after a cache lookup when the object requested was not found in the cache.
      当无法在缓存中找到所要请求的数据时调用此函数

vcl_pass()
  Called when the request is to be passed to the backend without looking it up in the cache.
      当请求无须在缓存中查找而直接转交给后端服务时调用此函数

vcl_fetch()
  Called when the request has been sent to the backend and a response has been received from the backend.
      当请求已经被转交给后端,并且收到后端的应答时调用此函数

vcl_deliver()
  Called before a response object (from the cache or the web server) is sent to the requesting client.
     在(来自于缓存或后端web服务的)应答对象送到客户端之前调用此函数

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值