6

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?

Thanks!

Daniel
  • 193
  • 1
  • 6

2 Answers2

9

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.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63
2

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

l33tcodes
  • 31
  • 1
  • 4