comparison src/http/ngx_http_cache.h @ 498:207ae3ff0444 NGINX_0_8_1

nginx 0.8.1 *) Feature: the "updating" parameter in "proxy_cache_use_stale" and "fastcgi_cache_use_stale" directives. *) Bugfix: the "If-Modified-Since", "If-Range", etc. client request header lines were passed to backend while caching if no "proxy_set_header" directive was used with any parameters. *) Bugfix: the "Set-Cookie" and "P3P" response header lines were not hidden while caching if no "proxy_hide_header/fastcgi_hide_header" directives were used with any parameters. *) Bugfix: the ngx_http_image_filter_module did not support GIF87a format. Thanks to Denis Ilyinyh. *) Bugfix: nginx could not be built modules on Solaris 10 and early; the bug had appeared in 0.7.56.
author Igor Sysoev <http://sysoev.ru>
date Mon, 08 Jun 2009 00:00:00 +0400
parents 549994537f15
children f0cac61857ae
comparison
equal deleted inserted replaced
497:77fae36a61b3 498:207ae3ff0444
11 #include <ngx_config.h> 11 #include <ngx_config.h>
12 #include <ngx_core.h> 12 #include <ngx_core.h>
13 #include <ngx_http.h> 13 #include <ngx_http.h>
14 14
15 15
16 /**/
17 #define NGX_HTTP_CACHE_STALE 1 16 #define NGX_HTTP_CACHE_STALE 1
18 #define NGX_HTTP_CACHE_AGED 2 17 #define NGX_HTTP_CACHE_UPDATING 2
19 #define NGX_HTTP_CACHE_THE_SAME 3
20 /**/
21 18
22 #define NGX_HTTP_CACHE_KEY_LEN 16 19 #define NGX_HTTP_CACHE_KEY_LEN 16
23 20
24 21
25 typedef struct { 22 typedef struct {
26 ngx_uint_t status; 23 ngx_uint_t status;
27 time_t valid; 24 time_t valid;
28 } ngx_http_cache_valid_t; 25 } ngx_http_cache_valid_t;
29 26
30
31 /* ngx_http_file_cache_node_t takes exactly 64 bytes on FreeBSD/i386 */
32 27
33 typedef struct { 28 typedef struct {
34 ngx_rbtree_node_t node; 29 ngx_rbtree_node_t node;
35 ngx_queue_t queue; 30 ngx_queue_t queue;
36 31
39 34
40 unsigned count:20; 35 unsigned count:20;
41 unsigned uses:10; 36 unsigned uses:10;
42 unsigned valid_msec:10; 37 unsigned valid_msec:10;
43 unsigned error:10; 38 unsigned error:10;
44 /* 7 unused bits */
45 unsigned exists:1; 39 unsigned exists:1;
40 unsigned updating:1;
41 /* 12 unused bits */
46 42
47 ngx_file_uniq_t uniq; 43 ngx_file_uniq_t uniq;
48 time_t expire; 44 time_t expire;
49 time_t valid_sec; 45 time_t valid_sec;
50 size_t body_start; 46 size_t body_start;
66 size_t header_start; 62 size_t header_start;
67 size_t body_start; 63 size_t body_start;
68 off_t length; 64 off_t length;
69 65
70 ngx_uint_t min_uses; 66 ngx_uint_t min_uses;
71 ngx_uint_t uses;
72 ngx_uint_t error; 67 ngx_uint_t error;
73 ngx_uint_t valid_msec; 68 ngx_uint_t valid_msec;
74 69
75 ngx_buf_t *buf; 70 ngx_buf_t *buf;
76 71