diff src/http/modules/proxy/ngx_http_proxy_handler.h @ 176:c0552e5ab567

nginx-0.0.1-2003-11-09-23:03:38 import; separate building
author Igor Sysoev <igor@sysoev.ru>
date Sun, 09 Nov 2003 20:03:38 +0000
parents e92c2c647c57
children c966c09be66b
line wrap: on
line diff
--- a/src/http/modules/proxy/ngx_http_proxy_handler.h
+++ b/src/http/modules/proxy/ngx_http_proxy_handler.h
@@ -80,10 +80,24 @@ typedef struct {
 } ngx_http_proxy_loc_conf_t;
 
 
+/*
+ * "EXPR/10/5/- 200/EXP/60 4"
+ * "MISS/-/-/B 503/-/- -"
+ * "EXPR/10/20/SB HIT/-/- -"
+ * "EXPR/10/15/NB HIT/-/- -"
+ */
+
 typedef struct {
-    ngx_http_proxy_state_e           cache;
+    ngx_http_proxy_state_e           cache_state;
+    time_t                           expired;
+    time_t                           bl_time;
+    int                              bl_state;
+
+    int                              status;
     ngx_http_proxy_reason_e          reason;
-    int                              status;
+    time_t                           time;
+    time_t                           expires;
+
     ngx_str_t                       *peer;
 } ngx_http_proxy_state_t;
 
@@ -140,12 +154,14 @@ struct ngx_http_proxy_ctx_s {
 
     ngx_hunk_t                   *header_in;
 
-    time_t                        busy_lock_time;
+    ngx_http_busy_lock_ctx_t      busy_lock;
 
     unsigned                      accel:1;
 
     unsigned                      cachable:1;
     unsigned                      stale:1;
+    unsigned                      try_busy_lock:1;
+    unsigned                      busy_locked:1;
     unsigned                      valid_header_in:1;
 
     unsigned                      request_sent:1;
@@ -187,6 +203,10 @@ int ngx_http_proxy_send_cached_response(
 int ngx_http_proxy_is_cachable(ngx_http_proxy_ctx_t *p);
 int ngx_http_proxy_update_cache(ngx_http_proxy_ctx_t *p);
 
+void ngx_http_proxy_busy_lock_handler(ngx_event_t *rev);
+void ngx_http_proxy_cache_busy_lock(ngx_http_proxy_ctx_t *p);
+void ngx_http_proxy_upstream_busy_lock(ngx_http_proxy_ctx_t *p);
+
 size_t ngx_http_proxy_log_error(void *data, char *buf, size_t len);
 void ngx_http_proxy_finalize_request(ngx_http_proxy_ctx_t *p, int rc);
 void ngx_http_proxy_close_connection(ngx_http_proxy_ctx_t *p);