Re: Status module – cache expiration, invalidation & poisoning.
António P. P. Almeida
appa at perusio.net
Sun Oct 14 18:32:27 UTC 2012
On 14 Out 2012 20h11 CEST, quintinpar at gmail.com 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
$upstream_cache_status.
ngx.var.upstream_cache_status paired with
http://wiki.nginx.org/HttpLuaModule#ngx.location.capture
to use a specific location to write to RRDtool.
Just an idea,
--- appa
More information about the nginx
mailing list