# Enabling proxy cache causes all responses to be buffered

**URL:** <https://www.ruby-forum.com/t/enabling-proxy-cache-causes-all-responses-to-be-buffered/225610>\
**Category:** NGINX\
**Created:** [January 18, 2013, 11:27am UTC](https://www.ruby-forum.com/t/enabling-proxy-cache-causes-all-responses-to-be-buffered/225610 "2013-01-18T11:27:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [January 18, 2013, 11:27am UTC](https://www.ruby-forum.com/t/enabling-proxy-cache-causes-all-responses-to-be-buffered/225610/1 "2013-01-18T11:27:18Z")

</div>

Hi,

I am using nginx as a download proxy cache, caching files locally. I  
have  
configured nginx to cache certain paths, for the rest I set  
proxy\_cache\_bypass to make sure they are not cached.

The config looks something like this:

```
proxy_buffering on;
proxy_cache_path _@cache_path_@ levels=1:2 

```

keys\_zone=cache\_one:128m  
inactive=1440m max\_size=2000m;  
proxy\_cache\_methods GET;  
…  
…  
location /service {  
# Send request to java objectStoreService servlet  
proxy\_cache\_bypass true;  
proxy\_pass url;  
}

```
    location ~ /get_file$ {
        proxy_pass url;
    }

```

However I see that every response is being buffered and saved for futur  
even  
when proxy\_cache\_bypass is set to true, how can I skip caching and  
buffering  
altogether for unwanted paths for example /service in the above conf

Any help is much appreciated, thanks!

Thanks  
Sachin

Posted at Nginx Forum:

> **[Enabling proxy cache causes all responses to be buffered](https://forum.nginx.org/read.php?2,235264,235264#msg-235264)**
>
> Hi, I am using nginx as a download proxy cache, caching files locally. I have configured nginx to cache certain paths, for the rest I set proxy\_cache\_bypass to make sure they are not cached. The config looks something like this: proxy\_buffering on;
