# Disable Caching

**URL:** <https://www.ruby-forum.com/t/disable-caching/226343>\
**Category:** NGINX\
**Created:** [July 19, 2012, 7:09pm UTC](https://www.ruby-forum.com/t/disable-caching/226343 "2012-07-19T19:09:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgarstang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@dgarstang](https://www.ruby-forum.com/u/dgarstang)\
**Post date:** [July 19, 2012, 7:09pm UTC](https://www.ruby-forum.com/t/disable-caching/226343/1 "2012-07-19T19:09:00Z")

</div>

All,

I have an nginx config that looks like this…

user www-data;  
worker\_processes 4;  
pid /var/run/nginx.pid;

events {  
worker\_connections 768;

# multi\_accept on;

}

http {  
sendfile on;  
tcp\_nopush on;  
tcp\_nodelay on;  
keepalive\_timeout 65;  
types\_hash\_max\_size 2048;

include /etc/nginx/mime.types;  
default\_type application/octet-stream;

access\_log /var/log/nginx/access.log;  
error\_log /var/log/nginx/error.log;

gzip on;  
gzip\_disable “msie6”;

include /etc/nginx/conf.d/_.conf;  
include /etc/nginx/sites-enabled/_;  
}

In the included sites-enabled/portal file, there is a server section  
that has:

server {  
listen 80;  
server\_name [portal.xxx.com](http://portal.xxx.com);  
rewrite ^ https://portal.xxx.com$request\_uri? permanent;  
proxy\_no\_cache 1;  
proxy\_cache\_bypass 1;  
}

Note that both proxy\_no\_cache and proxy\_cache\_bypass are set to 1.  
However, it appears that caching _is_ occurring.

Why? How do we disable this?

Thanks,  
Doug.

Posted at Nginx Forum:

> **[Disable Caching](https://forum.nginx.org/read.php?2,228754,228754#msg-228754)**
>
> All, I have an nginx config that looks like this... user www-data; worker\_processes 4; pid /var/run/nginx.pid; events { worker\_connections 768; # multi\_accept on; } http { sendfile on; tc

---

<div class="post-metadata">

**Author:** ![dgarstang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@dgarstang](https://www.ruby-forum.com/u/dgarstang)\
**Post date:** [July 19, 2012, 7:19pm UTC](https://www.ruby-forum.com/t/disable-caching/226343/2 "2012-07-19T19:19:32Z")

</div>

On Thursday 19 July 2012 21:08:12 dgarstang wrote:  
[…]

> Note that both proxy\_no\_cache and proxy\_cache\_bypass are set to 1.  
> However, it appears that caching _is_ occurring.
> 
> Why? How do we disable this?

What? What exactly do you want to disable?

The proxy\_\* directives are related to the proxy module, and they only  
have  
meaning in combination with proxy\_pass.

> **[Модуль ngx\_http\_proxy\_module](http://nginx.org/ru/docs/http/ngx_http_proxy_module.html)**

wbr, Valentin V. Bartenev
