comparison src/http/ngx_http_cache.h @ 2944:f892042956e3 stable-0.7

merge r2895, r2896, r2926, r2927, r2928, r2930, and r2936: various proxy/fastcgi cache features and fixes: *) report about proxy/fastcgi_store and proxy/fastcgi_cache incompatibility *) delete useless r->cache->uses *) proxy_cache_use_stale/fastcgi_cache_use_stale updating *) inherit proxy_set_header, proxy_hide_header, and fastcgi_hide_header only if cache settings are similar *) add response file uniq while loading cold cache on demand
author Igor Sysoev <igor@sysoev.ru>
date Mon, 15 Jun 2009 09:30:59 +0000
parents b3b8c66bd520
children 4f28e63e42b4
comparison
equal deleted inserted replaced
2943:5da043342fe4 2944:f892042956e3
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