Hi Guys<div><br></div><div>I added some logic to change the beresp header in vcl_fetch. And I also do lookup for the same request in vcl_recv.</div><div><br></div><div>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</div>
<div>But the actually result is the change parts are not be cached</div><div><br></div><div>Here is my code:</div><div>in vcl_fetch</div><div><div>  if (req.url ~ "/(images|javascripts|stylesheets)/") {</div><div>
    unset beresp.http.Set-Cookie;</div><div>    set beresp.http.Cache-Control = "private, max-age = 3600, must-revalidate"; # 1 hour</div><div>    set beresp.ttl = 10m;</div><div>    set beresp.http.clientcache = "1";</div>
<div>    return(deliver);</div><div>  }</div></div><div><br></div><div>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</div>
<div><br></div><div>Found some explanation in varnish doc lib, seems not as exactly as I expected. Is the beresp inserted into cache totally?</div><div><br></div><div><span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: sans-serif; font-size: 16px; line-height: 20px; "><dt>
deliver</dt><dd style="margin-top: 3px; margin-bottom: 10px; margin-left: 30px; text-align: justify; line-height: 20px; ">Possibly insert the object into the cache, then deliver it to the client. Control will eventually pass to vcl_deliver</dd>
</span></div><div>  </div>