I have a PHP application under Apache that generates Excel files that are exact the same during a day just with different the names. The names are generated randomly and are killing the server because they are getting bigger and the user number is increasing too. Is Nginx able to help me on this? Any suggestions?
Playing around with the proxy_cache_key (and creatively using different variables for it) might get you to where you want to be. However, I suspect your best answer is to modify the code that generates those files to use a singular name when the content doesn't change; off the top of my head a very simple solution would be to use the MD5 hash of the file's contents as the file name. Nginx would be able to trivially cache that for you (but see the other caching settings on the same page I linked above to get the best bang for your buck).