Should Varnish hit when passed an unmatching ETag or an earlier modified date?

view full story

http://serverfault.com – We are currently spiking a Varnish implementation to see if it would be appropriate to sit in front of our Rails application. We want Varnish to cache the results of an API call and only hit the application when the client's ETag doesn't match the one stored in Varnish or the client's modified date is before Varnish's. So far, I have not seen Varnish take these values into account. We only get cache hits when the secondary requests are within the max age. Is this expected behaviour? (HowTos)