# Nginx 1.8.0 http\_proxy cache issues

**URL:** <https://www.ruby-forum.com/t/nginx-1-8-0-http-proxy-cache-issues/243048>\
**Category:** NGINX\
**Created:** [August 18, 2015, 1:18pm UTC](https://www.ruby-forum.com/t/nginx-1-8-0-http-proxy-cache-issues/243048 "2015-08-18T13:18:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [August 18, 2015, 1:18pm UTC](https://www.ruby-forum.com/t/nginx-1-8-0-http-proxy-cache-issues/243048/1 "2015-08-18T13:18:30Z")

</div>

Hi,

I’m using nginx 1.8.0 on Ubuntu 14.04 LTS.

# nginx -V

nginx version: nginx/1.8.0  
built with OpenSSL 1.0.1f 6 Jan 2014  
TLS SNI support enabled

configure arguments: --with-cc-opt=‘-g -O2 -fPIE -fstack-protector  
–param=ssp-buffer-size=4 -Wformat -Werror=format-security  
-D\_FORTIFY\_SOURCE=2 -mtune=corei7-avx -march=corei7’  
–with-ld-opt=‘-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro  
-Wl,-z,now  
-mtune=corei7-avx -march=corei7’ --prefix=/usr/share/nginx  
–conf-path=/etc/nginx/nginx.conf  
–http-log-path=/var/log/nginx/access.log  
–error-log-path=/var/log/nginx/error.log  
–lock-path=/var/lock/nginx.lock  
–pid-path=/run/nginx.pid  
–http-client-body-temp-path=/var/lib/nginx/body  
–http-fastcgi-temp-path=/var/lib/nginx/fastcgi  
–http-proxy-temp-path=/var/lib/nginx/proxy  
–http-scgi-temp-path=/var/lib/nginx/scgi  
–http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit  
–with-file-aio --with-http\_ssl\_module --with-http\_stub\_status\_module  
–with-http\_realip\_module --with-http\_auth\_request\_module  
–with-http\_addition\_module --with-http\_geoip\_module  
–with-http\_gunzip\_module --with-http\_gzip\_static\_module  
–with-http\_image\_filter\_module --with-http\_perl\_module  
–with-http\_secure\_link\_module  
–add-module=/opt/rebuildnginx/nginx-1.8.0/debian/modules/headers-more-nginx-module  
–add-module=/opt/rebuildnginx/nginx-1.8.0/debian/modules/nginx-auth-pam  
–add-module=/opt/rebuildnginx/nginx-1.8.0/debian/modules/nginx-cache-purge  
–add-module=/opt/rebuildnginx/nginx-1.8.0/debian/modules/nginx-development-kit  
–add-module=/opt/rebuildnginx/nginx-1.8.0/debian/modules/nginx-echo  
–add-module=/opt/rebuildnginx/nginx-1.8.0/debian/modules/ngx-fancyindex  
–add-module=/opt/rebuildnginx/nginx-1.8.0/debian/modules/nginx-lua  
–add-module=/opt/rebuildnginx/nginx-1.8.0/debian/modules/nginx-upstream-fair  
–add-module=/opt/rebuildnginx/nginx-1.8.0/debian/modules/set-misc-nginx-module

I have noticed that when I restart nginx (using restart or just simple  
stop  
and then start) the cache is not invalidated as it used to be.  
After each restart I get HIT for all pages that were valid in cache  
before  
the restart.  
Did anyone else noticed this behavior ? If yes, how did you fix it?

Posted at Nginx Forum:

> **[nginx 1.8.0 http\_proxy cache issues](https://forum.nginx.org/read.php?2,261077,261077#msg-261077)**
>
> Hi, I'm using nginx 1.8.0 on Ubuntu 14.04 LTS. # nginx -V nginx version: nginx/1.8.0 built with OpenSSL 1.0.1f 6 Jan 2014 TLS SNI support enabled configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector --param=ssp-b

---

<div class="post-metadata">

**Author:** ![adrian.biris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b5e925/32.png) [@adrian.biris](https://www.ruby-forum.com/u/adrian.biris)\
**Post date:** [August 18, 2015, 2:13pm UTC](https://www.ruby-forum.com/t/nginx-1-8-0-http-proxy-cache-issues/243048/2 "2015-08-18T14:13:25Z")

</div>

Hello!

On Tue, Aug 18, 2015 at 07:17:41AM -0400, adrian.biris wrote:

[…]

> I have noticed that when I restart nginx (using restart or just simple stop  
> and then start) the cache is not invalidated as it used to be.  
> After each restart I get HIT for all pages that were valid in cache before  
> the restart.  
> Did anyone else noticed this behavior ? If yes, how did you fix it?

Caches are not expected to be invalidated on restart (and they  
never used to be). If you want nginx to avoid using previously  
cached responses after a restart, you can remove the cache  
directory.

–  
Maxim D.

> **[nginx](http://nginx.org/)**
