Re: Status module – cache expiration, invalidation & poisoning.

António P. P. Almeida appa at
Sun Oct 14 18:32:27 UTC 2012

On 14 Out 2012 20h11 CEST, quintinpar at wrote:

> Hi all,
> I have a website that’s heavily cached – or intended to be heavily
> cached via Nginx .
> But somehow looking at the page response time I feeling there is a
> very high eviction/invalidation rate.
> Now is there way I can look at the cache status in Nginx for
> different. I don’t use the purge module.
> The only way I check cache status is through
> add_header X-Cache-Status $upstream_cache_status;
> I want to o/p the cache status to a RRD tool and look at the
> metrics.
> Is this possible?

 With Lua shouldn't be that difficult. You just inspect the value of

ngx.var.upstream_cache_status paired with
to use a specific location to write to RRDtool.

Just an idea,
--- appa

More information about the nginx mailing list