Hi Guys

I added some logic to change the beresp header in vcl_fetch. And I also do
lookup for the same request in vcl_recv.

The handling process I expected should be:  the first incoming request will
be changed by fetch logic and the second request should use the cache with
the changed part
But the actually result is the change parts are not be cached

Here is my code:
in vcl_fetch
  if (req.url ~ "/(images|javascripts|stylesheets)/") {
    unset beresp.http.Set-Cookie;
    set beresp.http.Cache-Control = "private, max-age = 3600,
must-revalidate"; # 1 hour
    set beresp.ttl = 10m;
    set beresp.http.clientcache = "1";
    return(deliver);
  }

And I also wanna the response of the second request have the max-age = 3600
and clientcache = 1. The actual result is max-age = 0 and no clientcache in
response

Found some explanation in varnish doc lib, seems not as exactly as I
expected. Is the beresp inserted into cache totally?

deliverPossibly insert the object into the cache, then deliver it to the
client. Control will eventually pass to vcl_deliver
_______________________________________________
varnish-misc mailing list
[email protected]
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to