title: Varnish ESI include only works when parent page is fetched from backend
body: <p>I'm running Varnish 3.0.2, Apache2, Pressflow. I am trying to get ESI up and working for the first time, and it does work, but only the first time the parent page is requested. After that it just pulls the parent page and the replaced content from the cache. The only thing I can think of is that the included content is being cached permanently, even though I am telling it to not cache the included file at all, here is the object for the included file being stored...</p>
  
  <pre><code>11 ObjProtocol  c HTTP/1.1
  11 ObjResponse  c OK
  11 ObjHeader    c Date: Wed, 18 Jul 2012 23:25:56 GMT
  11 ObjHeader    c X-Powered-By: PHP/5.3.3-1ubuntu9.10
  11 ObjHeader    c Last-Modified: Wed, 18 Jul 2012 23:25:56 +0000
  11 ObjHeader    c Expires: Sun, 11 Mar 1984 12:00:00 GMT
  11 ObjHeader    c Vary: Cookie,Accept-Encoding
  11 ObjHeader    c ETag: "1342653956"
  11 ObjHeader    c Content-Encoding: gzip
  11 ObjHeader    c Content-Length: 656
  11 ObjHeader    c Content-Type: text/html
  11 ObjHeader    c Server: Apache/2.2.11
  11 ObjHeader    c Cache-Control: no-store
  </code></pre>
  
  <p>I've spent a full day on this, searched, read every article I can find, tried a whole heap of config tweaking, both in the VCL and in the HTTP headers. I can't see anything I'm doing wrong.</p>
  
  <p>This is a snippet from my VCL, trying to force it to not store in the cache</p>
  
  <pre><code>sub vcl_fetch {
    set beresp.do_esi = true;
    if (req.url ~ "^/esi_") {
      set beresp.http.Cache-Control = "no-store";
      set beresp.ttl = 0s;
    }
  }
  </code></pre>
  
  <p>I would add that I am seeing nothing to inidicate errors in the varnishlog. I've tried using just the path, and host + path in the include src, but no difference. It simply won't ask the backend for fresh content. If you were looking at the logs for the second and subsequent requests, you wouldn't realise it was an ESI page.</p>