I was searching for a simple Nginx microcache solution and I end up seeing two ways to have microcache. Some tutorials use proxy_cache, while others fastcgi_cache. What are the differences, pros and cons between these two solutions?


  • Trey are for proxy_pass and fastcgi_pass respectively. There is no point to compare them – Alexey Ten Aug 15 '14 at 3:28
  • I'm not asking which one is better. I would like know why they are used for microcaching. For microcache purpose, what is the difference between them? – Daniel Aug 15 '14 at 3:49
  • 1
    If you use proxy_pass to access backend you must use proxy_cache. The same for fastcgi_pass/fastcgi_cache. – Alexey Ten Aug 15 '14 at 4:01
  • Other than that There is no difference between them – Alexey Ten Aug 15 '14 at 4:02

The difference between the two is the protocol used to communicate with the backend.

fastcgi_cache is related to the FastCGI backend protocol. It caches output from FastCGI connected backends.

proxy_cache is related to backends that use HTTP as the backend protocol, and it caches output from HTTP connected backends.


fastcgi is used in far more setup assistance for nginx caching than the proxy_cache. You are more likely to run into websites that offer substantive articles for configuring fastcgi caching than for proxy_cache so thats a pro.. to use fastcgi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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