Monitoring cache statistics

is it possible to somehow monitor nginx proxy_cache efficiency? For
example by having a variable that can be logged in the access log to see
if the request has been cached,

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,2520,2520#msg-2520

The answer that I got to this question was “Not yet”.

See http://forum.nginx.org/read.php?2,1890,2207#msg-2209.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,2520,2521#msg-2521

Thanks, Jim, I can live with “yet” too ))

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,2520,2525#msg-2525

nice stuff !

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,2520,2561#msg-2561

is it possible to somehow monitor nginx proxy_cache efficiency? For example by having a variable that can be logged in the access log to see if the request has been cached,

I wrote the attached patch to get some cache hit stats included in the
status module.

Hi people!

Just a small note - this patch does not work with nginx-1.4.4 :slight_smile:
I think it’s ok after 4.5 years, maybe there is a working version
around?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,2520,246221#msg-246221

Right, I have found that too, sorry for disturbance, thanks!

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,2520,246303#msg-246303

On Fri, Jan 10, 2014 at 03:50:05AM -0500, bodomic wrote:

Hi people!

Just a small note - this patch does not work with nginx-1.4.4 :slight_smile:
I think it’s ok after 4.5 years, maybe there is a working version around?

There’s the http://nginx.org/en/docs/http/ngx_http_status_module.html
module that includes cache statistics.

It’s currently available as part of NGINX Plus,
http://nginx.com/products/