Cache hit statistics?

Does nginx have a cache hit ratio statistic… Ive been searching … or
perhaps a way to differentiate in the logs wchi was served from cache
and which was not. Thanks

-Mike

Hello!

On Thu, Apr 19, 2012 at 07:10:45PM +0000, Micheal W. wrote:

Does nginx have a cache hit ratio statistic… Ive been
searching … or perhaps a way to differentiate in the logs wchi
was served from cache and which was not. Thanks

The $upstream_cache_status variable is what you are looking for.
It’s not yet described in docs, but here is a wiki entry:

http://wiki.nginx.org/HttpUpstreamModule#.24upstream_cache_status

Maxim D.