# Upstream\_cache\_status for proxy\_store

**URL:** <https://www.ruby-forum.com/t/upstream-cache-status-for-proxy-store/219621>\
**Category:** NGINX\
**Created:** [May 9, 2012, 2:58pm UTC](https://www.ruby-forum.com/t/upstream-cache-status-for-proxy-store/219621 "2012-05-09T14:58:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurdipe\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b77776/32.png) [@Gurdipe\_D](https://www.ruby-forum.com/u/Gurdipe_D)\
**Post date:** [May 9, 2012, 2:58pm UTC](https://www.ruby-forum.com/t/upstream-cache-status-for-proxy-store/219621/1 "2012-05-09T14:58:28Z")

</div>

Hi all:

The $upstream\_cache\_status variable can be used to log cache HIT/MISS.  
But  
I found it’s only working with proxy\_cache.  
Although, proxy\_cahe is much advanced than proxy\_store, we’ve to use the  
latter one.

Is there any alternative to log the same info?

---

<div class="post-metadata">

**Author:** ![SSSSSSS\_SS\_SSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/91b2a8/32.png) [@SSSSSSS\_SS\_SSS](https://www.ruby-forum.com/u/SSSSSSS_SS_SSS)\
**Post date:** [May 10, 2012, 11:08am UTC](https://www.ruby-forum.com/t/upstream-cache-status-for-proxy-store/219621/2 "2012-05-10T11:08:01Z")

</div>

Hello!

On Wed, May 09, 2012 at 08:57:51PM +0800, 杨镭 wrote:

> Hi all:
> 
> The $upstream\_cache\_status variable can be used to log cache HIT/MISS. But  
> I found it’s only working with proxy\_cache.  
> Although, proxy\_cahe is much advanced than proxy\_store, we’ve to use the  
> latter one.
> 
> Is there any alternative to log the same info?

With proxy\_store status will be always “MISS”, as it doesn’t  
return anything cached, it just stores a response got from  
upstream. If you use proxy\_store with error\_page/try\_files  
fallback to emulate cache, you may use e.g. distinct logging to  
obtain information whether a static file was served or there was  
upstream request.

Maxim D.
