Mercurial > hg > nginx
diff src/http/ngx_http_cache.h @ 199:a65b630b3a66
nginx-0.0.1-2003-11-28-11:40:40 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 28 Nov 2003 08:40:40 +0000 |
parents | 0b81c7a0b133 |
children | abeaebe0a33c |
line wrap: on
line diff
--- 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(n 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;