[nginx] Modules compatibility: cache purge fields.
Maxim Dounin
mdounin at mdounin.ru
Thu Sep 29 17:27:15 UTC 2016
details: http://hg.nginx.org/nginx/rev/e08e741f74cd
branches:
changeset: 6709:e08e741f74cd
user: Maxim Dounin <mdounin at mdounin.ru>
date: Thu Sep 29 18:06:01 2016 +0300
description:
Modules compatibility: cache purge fields.
diffstat:
src/core/ngx_file.h | 2 ++
src/http/ngx_http_cache.h | 5 ++++-
src/http/ngx_http_upstream.h | 1 +
3 files changed, 7 insertions(+), 1 deletions(-)
diffs (59 lines):
diff --git a/src/core/ngx_file.h b/src/core/ngx_file.h
--- a/src/core/ngx_file.h
+++ b/src/core/ngx_file.h
@@ -43,6 +43,7 @@ struct ngx_file_s {
typedef time_t (*ngx_path_manager_pt) (void *data);
+typedef ngx_msec_t (*ngx_path_purger_pt) (void *data);
typedef void (*ngx_path_loader_pt) (void *data);
@@ -52,6 +53,7 @@ typedef struct {
size_t level[NGX_MAX_PATH_LEVEL];
ngx_path_manager_pt manager;
+ ngx_path_purger_pt purger;
ngx_path_loader_pt loader;
void *data;
diff --git a/src/http/ngx_http_cache.h b/src/http/ngx_http_cache.h
--- a/src/http/ngx_http_cache.h
+++ b/src/http/ngx_http_cache.h
@@ -50,7 +50,8 @@ typedef struct {
unsigned exists:1;
unsigned updating:1;
unsigned deleting:1;
- /* 11 unused bits */
+ unsigned purged:1;
+ /* 10 unused bits */
ngx_file_uniq_t uniq;
time_t expire;
@@ -85,6 +86,7 @@ struct ngx_http_cache_s {
ngx_uint_t min_uses;
ngx_uint_t error;
ngx_uint_t valid_msec;
+ ngx_uint_t vary_tag;
ngx_buf_t *buf;
@@ -109,6 +111,7 @@ struct ngx_http_cache_s {
unsigned updating:1;
unsigned exists:1;
unsigned temp_file:1;
+ unsigned purged:1;
unsigned reading:1;
unsigned secondary:1;
};
diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h
--- a/src/http/ngx_http_upstream.h
+++ b/src/http/ngx_http_upstream.h
@@ -205,6 +205,7 @@ typedef struct {
ngx_array_t *cache_valid;
ngx_array_t *cache_bypass;
+ ngx_array_t *cache_purge;
ngx_array_t *no_cache;
#endif
More information about the nginx-devel
mailing list