vanish_3.0_ban

varnish3.0的tutorial:有个错误的地方

官方地址:https://www.varnish-cache.org/docs/3.0/tutorial/purging.html
ban已经内置于3.0以上版本中,用于清除cache

There is another way to invalidate content. Bans. You can think of bans as a sort of a filter. You ban certain content from being served from your cache. You can ban content based on any metadata we have.

Support for bans is built into Varnish and available in the CLI interface. For VG to ban every png object belonging on example.com they could issue:

ban req.http.host == "example.com" && req.http.url ~ "\.png$"

ban req.http.host == "example.com" && req.url ~ "\.png$"

Quite powerful, really.

ban req.http.host == "example.com" && req.url ~ ".png$" 如果使用转义\.则varnish报错,希望这个bug在后续版本中会修复

你可能感兴趣的:(职场,varnish,休闲,ban,req.url)