diff options
author | Roman Arutyunyan <arut@nginx.com> | 2017-05-25 15:57:59 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2017-05-25 15:57:59 +0300 |
commit | 8644d9491ad3c0eb16bcda1d452aba326e1f4dae (patch) | |
tree | 1425006b8569fe3059667742d484933ec9c0e7e5 /src/http/ngx_http_request.h | |
parent | c83922b18ddc83f654c1d0df48a6ca1ee9938078 (diff) | |
download | nginx-8644d9491ad3c0eb16bcda1d452aba326e1f4dae.tar.gz nginx-8644d9491ad3c0eb16bcda1d452aba326e1f4dae.zip |
Background subrequests for cache updates.
Previously, cache background update might not work as expected, making client
wait for it to complete before receiving the final part of a stale response.
This could happen if the response could not be sent to the client socket in one
filter chain call.
Now background cache update is done in a background subrequest. This type of
subrequest does not block any other subrequests or the main request.
Diffstat (limited to 'src/http/ngx_http_request.h')
-rw-r--r-- | src/http/ngx_http_request.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h index 98c0de769..283c58294 100644 --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -64,6 +64,7 @@ #define NGX_HTTP_SUBREQUEST_IN_MEMORY 2 #define NGX_HTTP_SUBREQUEST_WAITED 4 #define NGX_HTTP_SUBREQUEST_CLONE 8 +#define NGX_HTTP_SUBREQUEST_BACKGROUND 16 #define NGX_HTTP_LOG_UNSAFE 1 @@ -486,7 +487,6 @@ struct ngx_http_request_s { #if (NGX_HTTP_CACHE) unsigned cached:1; - unsigned cache_updater:1; #endif #if (NGX_HTTP_GZIP) @@ -543,6 +543,7 @@ struct ngx_http_request_s { unsigned stat_writing:1; unsigned stat_processing:1; + unsigned background:1; unsigned health_check:1; /* used to parse HTTP headers */ |