diff options
Diffstat (limited to 'src/http/ngx_http_cache.h')
-rw-r--r-- | src/http/ngx_http_cache.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/http/ngx_http_cache.h b/src/http/ngx_http_cache.h index 768ab0f56..aa9d28970 100644 --- a/src/http/ngx_http_cache.h +++ b/src/http/ngx_http_cache.h @@ -44,8 +44,8 @@ typedef struct { ngx_http_cache_t *elts; size_t hash; size_t nelts; - time_t life_time; - time_t check_time; + time_t life; + time_t update; ngx_pool_t *pool; } ngx_http_cache_hash_t; @@ -74,6 +74,13 @@ typedef struct { } ngx_http_cache_conf_t; +#define ngx_http_cache_unlock(ch, ce) \ + ngx_mutex_lock(&ch->mutex); \ + ce->refs--; \ + ngx_mutex_unlock(&ch->mutex); + + + #define NGX_HTTP_CACHE_STALE 1 #define NGX_HTTP_CACHE_AGED 2 #define NGX_HTTP_CACHE_THE_SAME 3 @@ -93,6 +100,9 @@ ngx_http_cache_t *ngx_http_cache_alloc(ngx_http_cache_hash_t *cache, int ngx_garbage_collector_http_cache_handler(ngx_gc_t *gc, ngx_str_t *name, ngx_dir_t *dir); +char *ngx_http_set_cache_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); + + extern ngx_module_t ngx_http_cache_module; |