diff src/http/ngx_http_upstream.c @ 5905:2f7e557eab5b

Cache: proxy_cache_lock_age and friends. Once this age is reached, the cache lock is discarded and another request can acquire the lock. Requests which failed to acquire the lock are not allowed to cache the response.
author Roman Arutyunyan <arut@nginx.com>
date Tue, 18 Nov 2014 20:41:12 +0300
parents 7d7eac6e31df
children 88d55e5934f7
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -784,6 +784,7 @@ ngx_http_upstream_cache(ngx_http_request
 
         c->lock = u->conf->cache_lock;
         c->lock_timeout = u->conf->cache_lock_timeout;
+        c->lock_age = u->conf->cache_lock_age;
 
         u->cache_status = NGX_HTTP_CACHE_MISS;
     }