I use this variable&nbsp;<span class="Apple-style-span" style="font-family: &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Sans&#39;, Arial, Verdana, sans-serif; line-height: 23px; "><span class="Apple-style-span" style="font-size: x-small; ">$upstream_cache_status added to my access log to check the Hit Percentage. &nbsp;While I think you can also use it to check whether the file is cached.&nbsp;</span></span><div>
<font class="Apple-style-span" face="&#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Sans&#39;, Arial, Verdana, sans-serif"><span class="Apple-style-span" style="line-height: 23px; font-size: x-small;">Add it to the log_format in you configure file, &nbsp;access every file you want to check, and the cache status will be shown in the access log.<br>
</span></font><div><font class="Apple-style-span" face="&#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, &#39;Lucida Sans&#39;, Arial, Verdana, sans-serif"><span class="Apple-style-span" style="line-height: 23px; font-size: x-small;"><br>
</span></font><div class="gmail_quote">On Thu, Dec 30, 2010 at 10:57 PM, digger18 <span dir="ltr">&lt;<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
I have implemented nginx with proxy cache successfully, however, I need<br>
to have the ability to check if a certain file is already cached or<br>
not.<br>
Is there a way to get a list of cached files?<br>
Maybe another way will be to send a HEAD request which contains the file<br>
URI to the proxy cache server to check if a file is already in cache?<br>
<br>
Are these methods possible?<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,162263,162263#msg-162263" target="_blank">http://forum.nginx.org/read.php?2,162263,162263#msg-162263</a><br>
<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><font color="#333333"><font face="&#39;comic sans ms&#39;, sans-serif">自由是我生命之基石,尊重是我行为之准绳</font></font><div><font color="#333333"><font face="&#39;comic sans ms&#39;, sans-serif">也许我以千百种方式生活在这世上,但我坚守我人生之信仰</font></font></div>
<div><font color="#333333"><font face="&#39;comic sans ms&#39;, sans-serif">所以,我的朋友</font></font></div><div><font color="#333333"><font face="&#39;comic sans ms&#39;, sans-serif">请平视的看着我,</font></font><span style="color:rgb(51, 51, 51)"><font face="&#39;comic sans ms&#39;, sans-serif">带着你的微笑</font></span></div>
<div><font color="#333333"><br></font></div><br>
</div></div>