Hello,
we like to avoid large objects to be cached.
I found the configuration below on
http://comments.gmane.org/gmane.comp.web.varnish.misc/4741 .
If I got it right the object will be fetched from the backend twice.
I wonder if someone knows a way to avoid fetching the object twice from the
backend (without changes to the backend: e.g. deliver large objects from a
certain directory or set an additional header by the backend).
sub vcl_recv {
if (req.http.x-pipe && req.restarts > 0) {
return(pipe);
}
}
sub vcl_fetch {
# This is the rule to knock out big files
if ( beresp.http.Content-Length ~ "[0-9]{8,}" ) {
set req.http.x-pipe = "1";
restart;
}
Kind Regads,
Christian Lukas
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc