if-none-match with proxy_cache : properly set headers

quoter nginx-forum at nginx.us
Wed Jul 16 06:14:54 UTC 2014

Maxim Dounin Wrote:
> Normally you shouldn't cache 304 responses from a backend, but 
> rather cache 200 responses from a backend and let nginx to return 
> 304 by its own.  This is how it works by default.
> Do you have problems with the default aproach?
> -- 
> Maxim Dounin
> http://nginx.org/en/donation.html
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Yes I do have some problems with this approach. In our nginx config we use
also option "fastcgi_cache_min_uses 5". So response body appears in cache
only after 5 user requests. But for our production purposes it is extremely
important to return 304 if client response has valid If-None-Match.

Dmitry Sukhov
quoter at yandex-team.ru

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,239689,251853#msg-251853

More information about the nginx mailing list