comparison src/http/ngx_http_cache.h @ 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 78c49e243848
children f7584d7c0ccb
comparison
equal deleted inserted replaced
5904:abb466a57a22 5905:2f7e557eab5b
55 ngx_file_uniq_t uniq; 55 ngx_file_uniq_t uniq;
56 time_t expire; 56 time_t expire;
57 time_t valid_sec; 57 time_t valid_sec;
58 size_t body_start; 58 size_t body_start;
59 off_t fs_size; 59 off_t fs_size;
60 ngx_msec_t lock_time;
60 } ngx_http_file_cache_node_t; 61 } ngx_http_file_cache_node_t;
61 62
62 63
63 struct ngx_http_cache_s { 64 struct ngx_http_cache_s {
64 ngx_file_t file; 65 ngx_file_t file;
89 90
90 ngx_http_file_cache_t *file_cache; 91 ngx_http_file_cache_t *file_cache;
91 ngx_http_file_cache_node_t *node; 92 ngx_http_file_cache_node_t *node;
92 93
93 ngx_msec_t lock_timeout; 94 ngx_msec_t lock_timeout;
95 ngx_msec_t lock_age;
96 ngx_msec_t lock_time;
94 ngx_msec_t wait_time; 97 ngx_msec_t wait_time;
95 98
96 ngx_event_t wait_event; 99 ngx_event_t wait_event;
97 100
98 unsigned lock:1; 101 unsigned lock:1;