作者:和你在一起1979 | 来源:互联网 | 2023-05-18 01:55
I've set up a caching server for a site through nginx 1.6.3 on CentOS 7, and it's configured to add http headers to served files to show if said files came from the caching server (HIT, MISS, or BYPASS) like so:
我在CentOS 7上通过nginx 1.6.3为一个站点设置了一个缓存服务器,它被配置为向服务文件添加http头,以显示所述文件是否来自缓存服务器(HIT、MISS或BYPASS),如下所示:
add_header X-Cached $upstream_cache_status;
However, i'd like to see if there's a way to add a header to display the age of the cached file, as my solution has proxy_cache_valid 200 60m;
set, and i'd like to check that it's respecting that setting.
但是,我想看看是否有一种方法可以添加标题来显示缓存文件的年龄,因为我的解决方案是proxy_cache_valid 20060m;集合,我想检查它是否与那个集合有关。
So what i'm looking for would be something like:
所以我要找的是:
add_header Cache-Age $upstream_cache_age;
I'm unable to find anything of the sort though, can you help?
我找不到这种东西,你能帮忙吗?
Thanks
谢谢
2 个解决方案