Nginx unexpectedly returning 304 for content cached from proxy

arnoldguo nginx-forum at
Thu Jan 21 12:38:40 MSK 2010

If using proxy_set_header If-None-Match "";then when the cache file expired the cache server will get the file again from the backend server even if the file is not changed,it's not good for a high traffic load site.
Maybe the nginx should see if the cache key exist first:
if  exist then fw the  If-None-Match header to backend,if the file has been changed, get file from the backend and overwrite the cache file,if not changes,reture 304,then remain the cache file.
if no exist,then get rid of the If-None-Match header to get a new file from the backend

Posted at Nginx Forum:,2703,43781#msg-43781

More information about the nginx mailing list