开发者

varnishtop show "list length 0"?

开发者 https://www.devze.com 2023-03-02 03:37 出处:网络
Var开发者_如何学JAVAnish 2.1.3 Ubuntu 10.04.02 LTS The varnishtop show \"list length 0\" only. The varnishstat always returns the same result as:

Var开发者_如何学JAVAnish 2.1.3 Ubuntu 10.04.02 LTS

The varnishtop show "list length 0" only.

The varnishstat always returns the same result as:

1+12:29:32                                                                                                              
CSV-004
Hitrate ratio:        1        1        1
Hitrate avg:     0.4272   0.4272   0.4272

  556579         0.00         4.24 Client connections accepted
 1122298         0.00         8.54 Client requests received
  447675         0.00         3.41 Cache hits
   27583         0.00         0.21 Cache hits for pass
......

Any help?


Varnish has some pretty sensible defaults, but it assumes that your app is unaware of the cache. Since you are in control of your application, you can make some assumptions varnish can't by default. By default, for example, Varnish will not cache any page when the request that started it included a cookie. While this makes sense if the web app is unknown, if the web app is known, it makes much more sense to let the web app decide what is the appropriate cache response.

So, since you know the system you are working with, you can adjust the config somewhat. When using your config file, Varnish will behave as follows. Varnish will cache all static content (within a particular directory). Varnish will not cache anything else unless the web app provides a max-age or s-max-age Cache-Control header. It will cache content if the above rules are met, even if a cookie is present. The assumption is that your web app is smart enough to know if the content can be cached whether a cookie is present or not. Again, see last years article to see how to set this up on the app side...

you can try below link for more information:

https://www.varnish-cache.org/trac/wiki/Introduction

0

精彩评论

暂无评论...
验证码 换一张
取 消