]> git.kaiwu.me - nginx.git/commitdiff
do not call ngx_http_file_cache_free() if a response is not cacheable
authorIgor Sysoev <igor@sysoev.ru>
Fri, 10 Apr 2009 14:48:41 +0000 (14:48 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 10 Apr 2009 14:48:41 +0000 (14:48 +0000)
src/http/ngx_http_upstream.c

index 157c5fd52599ed74b1b833f737e14d5708f10378..7e0c72a03772dbbbf6b6947d04988b10fdf6ab34 100644 (file)
@@ -2749,7 +2749,7 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r,
 
 #if (NGX_HTTP_CACHE)
 
-    if (r->cache) {
+    if (u->cacheable) {
         time_t  valid;
 
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,