aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_cache.h
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2013-11-18 20:48:22 +0400
committerMaxim Dounin <mdounin@mdounin.ru>2013-11-18 20:48:22 +0400
commit1ac2693a33bb65c6b0d777584ad8024aa743ee88 (patch)
tree3cf6108d0daf072726805e4379fde73af0818201 /src/http/ngx_http_cache.h
parentdf2fc6a9df06dcf334000a66c1173413883e1aba (diff)
downloadnginx-1ac2693a33bb65c6b0d777584ad8024aa743ee88.tar.gz
nginx-1ac2693a33bb65c6b0d777584ad8024aa743ee88.zip
Upstream: cache revalidation with conditional requests.
The following new directives are introduced: proxy_cache_revalidate, fastcgi_cache_revalidate, scgi_cache_revalidate, uwsgi_cache_revalidate. Default is off. When set to on, they enable cache revalidation using conditional requests with If-Modified-Since for expired cache items. As of now, no attempts are made to merge headers given in a 304 response during cache revalidation with headers previously stored in a cache item. Headers in a 304 response are only used to calculate new validity time of a cache item.
Diffstat (limited to 'src/http/ngx_http_cache.h')
-rw-r--r--src/http/ngx_http_cache.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http/ngx_http_cache.h b/src/http/ngx_http_cache.h
index 2a2d72291..193a35322 100644
--- a/src/http/ngx_http_cache.h
+++ b/src/http/ngx_http_cache.h
@@ -19,8 +19,9 @@
#define NGX_HTTP_CACHE_EXPIRED 3
#define NGX_HTTP_CACHE_STALE 4
#define NGX_HTTP_CACHE_UPDATING 5
-#define NGX_HTTP_CACHE_HIT 6
-#define NGX_HTTP_CACHE_SCARCE 7
+#define NGX_HTTP_CACHE_REVALIDATED 6
+#define NGX_HTTP_CACHE_HIT 7
+#define NGX_HTTP_CACHE_SCARCE 8
#define NGX_HTTP_CACHE_KEY_LEN 16
@@ -143,6 +144,7 @@ void ngx_http_file_cache_create_key(ngx_http_request_t *r);
ngx_int_t ngx_http_file_cache_open(ngx_http_request_t *r);
void ngx_http_file_cache_set_header(ngx_http_request_t *r, u_char *buf);
void ngx_http_file_cache_update(ngx_http_request_t *r, ngx_temp_file_t *tf);
+void ngx_http_file_cache_update_header(ngx_http_request_t *r);
ngx_int_t ngx_http_cache_send(ngx_http_request_t *);
void ngx_http_file_cache_free(ngx_http_cache_t *c, ngx_temp_file_t *tf);
time_t ngx_http_file_cache_valid(ngx_array_t *cache_valid, ngx_uint_t status);