Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.