我试图configuration清漆不caching任何开始与“分段”使用传递方法如下所示的域:
if( req.url ~ "^(staging.)" )
我怀疑我正在使用VCLselect器错误,但环顾四周后
如果你想清漆“不要caching”和“不要在caching中查找”,那么以下应该工作…
# not to look up in the cache sub vcl_recv { if( req.http.host ~ "^staging" ) { return( pass ); } # other directives } # not to cache sub vcl_fetch { if( req.http.host ~ "^staging" ) { return( hit_for_pass ); } }
有关更多信息,请查看官方关于Varnish的书籍的类似解决scheme 。
req.url
没有这些信息。 尝试使用req.http.Host
而不是?