#83 closed defect (invalid)
proxy_cache_valid 200 being ignored
Reported by: | Justin Dorfman | Owned by: | somebody |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | nginx-core | Version: | 0.8.x |
Keywords: | 406, cache, 200, proxy_cache_valid | Cc: | |
uname -a: | Linux 2.6.18-238.9.1.el5.fsl_2.0.2.1 #1 SMP Thu Jun 2 14:28:55 PDT 2011 x86_64 x86_64 x86_64 GNU/Linux | ||
nginx -V: |
nginx version: nginx/0.8.36
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-46) TLS SNI support disabled configure arguments: --with-http_ssl_module --with-http_stub_status_module --add-module=/home/user/nginx-accesskey-2.0.3/ --add-module=/home/user/ngx_cache_purge-1.0/ |
Description
Hello everyone. What happens is that if a 406 response page has a cache-control header, nginx caches the 406 even though the vhost instructs nginx to cache only 200's (that is what I thought proxy_cache_valid 200 did).
You can read more about it here: http://meta.stackoverflow.com/a/117738/165375
I know we are a few releases behind so if we just need to upgrade nginx please let me know so the ticket can be closed.
Thanks for listening.
Change History (2)
follow-up: 2 comment:1 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 13 years ago
Replying to Maxim Dounin:
The proxy_cache_valid directive is only used if there are no response headers (Cache-Control, Expires, Set-Cookie, X-Accel-Expires) which explicitly allow or disallow caching.
If you want these headers to be ignored and only proxy_cache_valid times used, use proxy_ignore_headers directive.
Thanks for the heads up. I appreciate you taking the time to point me in the right direction.
The proxy_cache_valid directive is only used if there are no response headers (Cache-Control, Expires, Set-Cookie, X-Accel-Expires) which explicitly allow or disallow caching.
If you want these headers to be ignored and only proxy_cache_valid times used, use proxy_ignore_headers directive.