comparison src/http/ngx_http_upstream.h @ 9305:8cdab3d89c44

Upstream: using the "Age" header when caching responses. As long as the "Age" header is present and not ignored, it is now respected when caching responses per "Cache-Control: max-age", reducing cache validity time.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 18 Jul 2024 19:39:39 +0300
parents 0784ab86ad08
children
comparison
equal deleted inserted replaced
9304:f209bf590e84 9305:8cdab3d89c44
52 #define NGX_HTTP_UPSTREAM_IGN_SET_COOKIE 0x00000020 52 #define NGX_HTTP_UPSTREAM_IGN_SET_COOKIE 0x00000020
53 #define NGX_HTTP_UPSTREAM_IGN_XA_LIMIT_RATE 0x00000040 53 #define NGX_HTTP_UPSTREAM_IGN_XA_LIMIT_RATE 0x00000040
54 #define NGX_HTTP_UPSTREAM_IGN_XA_BUFFERING 0x00000080 54 #define NGX_HTTP_UPSTREAM_IGN_XA_BUFFERING 0x00000080
55 #define NGX_HTTP_UPSTREAM_IGN_XA_CHARSET 0x00000100 55 #define NGX_HTTP_UPSTREAM_IGN_XA_CHARSET 0x00000100
56 #define NGX_HTTP_UPSTREAM_IGN_VARY 0x00000200 56 #define NGX_HTTP_UPSTREAM_IGN_VARY 0x00000200
57 #define NGX_HTTP_UPSTREAM_IGN_AGE 0x00000400
57 58
58 59
59 typedef struct { 60 typedef struct {
60 ngx_uint_t status; 61 ngx_uint_t status;
61 ngx_msec_t response_time; 62 ngx_msec_t response_time;
285 ngx_table_elt_t *transfer_encoding; 286 ngx_table_elt_t *transfer_encoding;
286 ngx_table_elt_t *vary; 287 ngx_table_elt_t *vary;
287 288
288 ngx_table_elt_t *cache_control; 289 ngx_table_elt_t *cache_control;
289 ngx_table_elt_t *set_cookie; 290 ngx_table_elt_t *set_cookie;
291 ngx_table_elt_t *age;
290 292
291 off_t content_length_n; 293 off_t content_length_n;
292 time_t last_modified_time; 294 time_t last_modified_time;
295 time_t age_n;
293 296
294 unsigned connection_close:1; 297 unsigned connection_close:1;
295 unsigned chunked:1; 298 unsigned chunked:1;
296 unsigned no_cache:1; 299 unsigned no_cache:1;
297 unsigned expired:1; 300 unsigned expired:1;
301 unsigned max_age:1;
298 } ngx_http_upstream_headers_in_t; 302 } ngx_http_upstream_headers_in_t;
299 303
300 304
301 typedef struct { 305 typedef struct {
302 ngx_str_t host; 306 ngx_str_t host;