Mercurial > hg > nginx
comparison src/http/ngx_http_cache.h @ 5736:2fe1967f8854
Cache: version in cache files.
This allows to change the structure of cache files without spamming logs
with false alerts.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 26 Jun 2014 02:27:21 +0400 |
parents | 43ccaf8e8728 |
children | 44b9ab7752e3 |
comparison
equal
deleted
inserted
replaced
5735:5fb1e57c758a | 5736:2fe1967f8854 |
---|---|
22 #define NGX_HTTP_CACHE_REVALIDATED 6 | 22 #define NGX_HTTP_CACHE_REVALIDATED 6 |
23 #define NGX_HTTP_CACHE_HIT 7 | 23 #define NGX_HTTP_CACHE_HIT 7 |
24 #define NGX_HTTP_CACHE_SCARCE 8 | 24 #define NGX_HTTP_CACHE_SCARCE 8 |
25 | 25 |
26 #define NGX_HTTP_CACHE_KEY_LEN 16 | 26 #define NGX_HTTP_CACHE_KEY_LEN 16 |
27 | |
28 #define NGX_HTTP_CACHE_VERSION 1 | |
27 | 29 |
28 | 30 |
29 typedef struct { | 31 typedef struct { |
30 ngx_uint_t status; | 32 ngx_uint_t status; |
31 time_t valid; | 33 time_t valid; |
95 unsigned temp_file:1; | 97 unsigned temp_file:1; |
96 }; | 98 }; |
97 | 99 |
98 | 100 |
99 typedef struct { | 101 typedef struct { |
102 ngx_uint_t version; | |
100 time_t valid_sec; | 103 time_t valid_sec; |
101 time_t last_modified; | 104 time_t last_modified; |
102 time_t date; | 105 time_t date; |
103 uint32_t crc32; | 106 uint32_t crc32; |
104 u_short valid_msec; | 107 u_short valid_msec; |