diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-11-28 08:40:40 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-11-28 08:40:40 +0000 |
commit | 877df63f345e48bc2cb61dde86a207748051b81a (patch) | |
tree | a27f94499f27c0d079a6c7bbd3a33318e01345db /src/http/ngx_http_cache.h | |
parent | 764543e73426fd00741483ff830cf09bfb73752f (diff) | |
download | nginx-877df63f345e48bc2cb61dde86a207748051b81a.tar.gz nginx-877df63f345e48bc2cb61dde86a207748051b81a.zip |
nginx-0.0.1-2003-11-28-11:40:40 import
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; |