Disable Caching

dgarstang nginx-forum at nginx.us
Thu Jul 19 17:08:12 UTC 2012


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;
    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?


Posted at Nginx Forum: http://forum.nginx.org/read.php?2,228754,228754#msg-228754

More information about the nginx mailing list