I'm converting from 2.1 to 3.0.  I got bit by the beresp.cacheable variable going away, and replacing it with beresp.ttl > 0s doesn't work because ttl hasn't been determined yet; it's a -1.000.<br><br>This is the block of code in question (in vcl_fetch)<br>
<br>        if (!beresp.cacheable && beresp.status != 404) {<br>                set beresp.http.X-Cacheable = "NO: !beresp.cacheable";<br>                return (pass);<br>        } else {<br>                # From <a href="http://varnish-cache.org/wiki/VCLExampleLongerCaching">http://varnish-cache.org/wiki/VCLExampleLongerCaching</a><br>
                /* Remove Expires from backend, it's not long enough */<br>                unset beresp.http.expires;<br>        }<br><br>If beresp.ttl hasn't been determined yet, what's the appropriate replacement?<br>
<br>On a related note, I was looking at the source code for 2.1.  From my quick reading, it looks like beresp.cacheable is determined by request type and return status.  I don't see where apache/drupal/web-server cache headers are consulted at all.<br>
<br>Am I missing something there?  Are back-end cache headers to be parsed in VCL rather than being automagically determined?<br><br>TIA,<br><br>--- David<br>