Use ETag or Last-Modified to utilize 304 Not Modified until ESI fragment has expired then send a 200
Rob Olmos
rolmos at endertech.com
Thu Aug 15 06:34:28 CEST 2013
I believe this may be more of a feature request because I'm unable to
find anything in regards to this but basically I would like to utilize
"304 Not Modified" responses until an ESI fragment has expired and then
send a "200 OK" with the full document and updated ESI fragment.
Right now I have a parent document that has a couple ESI fragments
within it. Essentially I would like to set a cache header, such as an
ETag, on the parent document so that client browsers can utilize
If-None-Match or If-Modified-Since and receive "304 Not Modified"
instead of a 200 with the whole document thus saving bandwidth.
Is there a way to check within the VCL parent document request that an
ESI fragment has expired?
I'm thinking that would allow me to update the Etag or Last-Modified
headers of the parent document. However, it would also need to update
the parent document cached object with these new values as well and
Varnish would need to be aware of that so it doesn't send a 304 but
instead a 200.
Thanks
--
Rob Olmos
EnderTech
More information about the varnish-misc
mailing list