diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-09-04 09:57:38 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-09-04 09:57:38 +0000 |
commit | 8013a830679eeb857015c76bac96968a7605d020 (patch) | |
tree | 5a04ec37b30b0a21f425cab2f15b67572a9e7f56 /src | |
parent | 7d71c80b16058f79a6c269dc07c39f8a5ec06134 (diff) | |
download | nginx-8013a830679eeb857015c76bac96968a7605d020.tar.gz nginx-8013a830679eeb857015c76bac96968a7605d020.zip |
clean cache updating state if a response has uncacheable code or
cache prohibitive headers
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_upstream.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 9aa797ac0..6f15c044d 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2113,6 +2113,10 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u) ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, "http cacheable: %d", u->cacheable); + if (u->cacheable == 0 && r->cache) { + ngx_http_file_cache_free(r, u->pipe->temp_file); + } + #endif p = u->pipe; |