how can I make varnish to just cache but don't deliver?

Pahud pahudnet at
Mon Jul 5 15:17:37 CEST 2010

Hell list,

I am running some varnish boxes for my CDN deployment.  I am gonna parse the
varnish log to see its recent received requests and ask other varnish boxes
to cache those content as well.

It is very easy to write a script with curl to make it possible, but If I
curl on other varnish boxes they well return the content back to me, which I
don't want it to do so.

I am thinking maybe I can send a "Cache-Control: just-cache" header to other
boxes and when they see this header they will not 'deliver' in theyr
vcl_deliver(). So I tried this configuration

sub vcl_deliver {
         if (req.http.Cache-Control ~ "just-cache") {
               error 200 "Cached";
               return (pass);
    return (deliver);

But no good luck. I guess vcl_deliver just can't get the value of

Is it still possible to achieve this just with VCL?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list