Hi!<br>I'm playing with If-None-Match and Cache-Control: max-age headers and I have a doubt. Maybe it is more related to HTTP than Varnish, but it worth asking.<br><br>Imagine that I have 3 user-agents, a varnish and my webserver.<br>
When the clients ask the first time for /example, varnish doesn't have anything cached so he ask the webserver for it. The webserver response has Cache-Control: max-age=180 and ETag: 123 (for example).<br>So Varnish will cache the response for 180 seconds as well as the user-agents.<br>
After 180 seconds, the 3 user-agents will request /example for a conditional If-None-Match header because they got the ETag. Since it is a conditional request varnish will ask the webserver and will get a fresh response with all the caching headers. When the other 2 user-agent make the same conditional request they will generate another request to the webserver unless varnish has some mechanism to answer himself.<br>
Is that right? Does varnish has this mechanism?<br><br>Thanks!<br><br>Jonathan<br>