Mercurial > hg > nginx-quic
diff src/http/ngx_http_file_cache.c @ 5951:610832763648
Upstream: added variables support to proxy_cache and friends.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 22 Dec 2014 12:59:09 +0300 |
parents | 1573fc7875fa |
children | f7584d7c0ccb |
line wrap: on
line diff
--- a/src/http/ngx_http_file_cache.c +++ b/src/http/ngx_http_file_cache.c @@ -2032,6 +2032,8 @@ ngx_http_file_cache_valid(ngx_array_t *c char * ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { + char *confp = conf; + off_t max_size; u_char *last, *p; time_t inactive; @@ -2040,7 +2042,8 @@ ngx_http_file_cache_set_slot(ngx_conf_t ngx_int_t loader_files; ngx_msec_t loader_sleep, loader_threshold; ngx_uint_t i, n; - ngx_http_file_cache_t *cache; + ngx_array_t *caches; + ngx_http_file_cache_t *cache, **ce; cache = ngx_pcalloc(cf->pool, sizeof(ngx_http_file_cache_t)); if (cache == NULL) { @@ -2252,6 +2255,15 @@ ngx_http_file_cache_set_slot(ngx_conf_t cache->inactive = inactive; cache->max_size = max_size; + caches = (ngx_array_t *) (confp + cmd->offset); + + ce = ngx_array_push(caches); + if (ce == NULL) { + return NGX_CONF_ERROR; + } + + *ce = cache; + return NGX_CONF_OK; }