热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

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

vcl_recv()Calledafterarequestisreceivedfromthebrowser,butbeforeitisprocessed.接收

 


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服务的)应答对象送到客户端之前调用此函数


推荐阅读
author-avatar
ScilenceBill
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有