Proxy Cache - Check if file has been cached

Hi,
I have implemented nginx with proxy cache successfully, however, I need
to have the ability to check if a certain file is already cached or
not.
Is there a way to get a list of cached files?
Maybe another way will be to send a HEAD request which contains the file
URI to the proxy cache server to check if a file is already in cache?

Are these methods possible?

Posted at Nginx Forum:

Checking the header “Expires” is probably the most reliable way.

Cheers,

Simon

2010/12/30 digger18 [email protected]

I use this variable $upstream_cache_status added to my access log to
check
the Hit Percentage. While I think you can also use it to check whether
the
file is cached.
Add it to the log_format in you configure file, access every file you
want
to check, and the cache status will be shown in the access log.