clean cache updating state if a response has uncacheable code or

cache prohibitive headers
This commit is contained in:
Igor Sysoev 2009-09-04 09:57:38 +00:00
parent 7d71c80b16
commit 8013a83067

View File

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