How to write VCL in varnish to do no caching

試著忘記壹切 提交于 2019-12-02 13:08:20

Write and load your own .vcl file to instruct varnish when to cache. By default, requests with cookies will not be cached.

You could start with the Varnish tutorial, and don't hesitate to ask a more specific question on this site if you can't make it work...

Place the following inside your vcl_recv:

# as soon as we have a NO_CACHE cookie pass request
if (req.http.cookie ~ "NO_CACHE=") {
    return (pass);
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!