Question about proxy_cache_min_uses

essenz nginx-forum at
Sun May 10 03:34:49 UTC 2020

When I did a search for this I only found one thread, but it was in Russian
and hard to translate.

I currently playing with an image cache for application frontend to a
"massive" amount of proxied images. With proxy_cache_min_uses=1 my cache
grows extremely fast and I cap it at 100G (for disk performance) and I get
an average cache hit rate of 6%. With proxy_cache_min_uses=2 it grows much
slower and actually plateaus at 23G with a cache hit rate of 5%.

My concern is as follows, proxy_cache_min_uses=1 effectively caches
everything, which is too much... But proxy_cache_min_uses=2 doesn't cache
enough. I'm struggling to understand exactly how proxy_cache_min_uses works,
by setting it to 2 nginx needs to somehow know that 2 requests were made for
a given piece of content. But how does it do that? And over what timeframe?
2 requests in the current connection buffer, 2 requests over the past 5
mins, etc.,.

Posted at Nginx Forum:,287983,287983#msg-287983

More information about the nginx mailing list