Commit 79860414 authored by Tatuya Kamada's avatar Tatuya Kamada

Add 3.0.x version into varnish component.

Make varnish recipe use 3.0.x version varnish.
parent fc037c53
......@@ -5,7 +5,7 @@
parts =
varnish
varnish-2.1
varnish-3.0
extends =
../ncurses/buildout.cfg
../pcre/buildout.cfg
......@@ -35,3 +35,8 @@ environment =
PKG_CONFIG_PATH=${pcre:location}/lib/pkgconfig
CPPFLAGS=-I${ncurses:location}/include
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
[varnish-3.0]
<= varnish-2.1
url = http://repo.varnish-cache.org/source/varnish-3.0.2.tar.gz
md5sum = c8eae0aabbe66b6daabdf3a1f58cd47a
......@@ -36,11 +36,11 @@ sub vcl_recv {
req.request != "PURGE" &&
req.request != "DELETE") {
/* Non-RFC2616 or CONNECT which is weird. */
pipe;
return(pipe);
}
if (req.request != "GET" && req.request != "HEAD" && req.request != "PURGE") {
/* We only deal with GET and HEAD by default */
pass;
return(pass);
}
remove req.http.Cookie;
remove req.http.Set-Cookie;
......@@ -67,12 +67,12 @@ sub vcl_recv {
# unset req.http.x;
#}
set req.grace = 30d;
lookup;
return(lookup);
}
sub vcl_hash {
set req.hash += req.url;
hash;
hash_data(req.url);
return(hash);
}
sub vcl_hit {
......@@ -90,21 +90,21 @@ sub vcl_hit {
remove req.http.Accept-Language;
remove req.http.Accept-Encoding;
remove req.http.Cookie;
deliver;
return(deliver);
}
sub vcl_miss {
fetch;
return(fetch);
}
sub vcl_fetch {
/* Never send request to backend even if client ask refreshed content */
if (obj.cacheable) {
if (beresp.ttl > 0s) {
/* Setup grace period for 30days for all cacheable contents */
#set req.grace = 30d;
set obj.grace = 30d;
set beresp.grace = 30d;
}
deliver;
return(deliver);
}
......@@ -120,5 +120,5 @@ sub vcl_deliver {
# set resp.http.X-Hash = "No hash";
#}
deliver;
return(deliver);
}
......@@ -222,7 +222,7 @@ extra-context =
key dcron_location dcron:location
key gzip_location gzip:location
key logrotate_location logrotate:location
key varnish_location varnish:location
key varnish_location varnish-3.0:location
key wget_location wget:location
[networkcache]
......
......@@ -93,7 +93,7 @@ parts =
graphviz
memcached
haproxy
varnish-2.1
varnish-3.0
stunnel
w3m
poppler
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment