}
if ((file->event && file->use_event)
- || (file->event == NULL && now - file->created < of->valid))
+ || (file->event == NULL
+ && (of->uniq == 0 || of->uniq == file->uniq)
+ && now - file->created < of->valid))
{
if (file->err == 0) {
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
+ of.uniq = 0;
of.test_dir = 0;
of.valid = clcf->open_file_cache_valid;
of.min_uses = clcf->open_file_cache_min_uses;
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
+ of.uniq = 0;
of.test_dir = 0;
of.valid = clcf->open_file_cache_valid;
of.min_uses = clcf->open_file_cache_min_uses;
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "open index \"%V\"", &path);
+ of.uniq = 0;
of.test_dir = 0;
of.valid = clcf->open_file_cache_valid;
of.min_uses = clcf->open_file_cache_min_uses;
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http index check dir: \"%V\"", &dir);
+ of.uniq = 0;
of.test_dir = 1;
of.valid = clcf->open_file_cache_valid;
of.min_uses = 0;
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
+ of.uniq = 0;
of.test_dir = 0;
of.valid = clcf->open_file_cache_valid;
of.min_uses = clcf->open_file_cache_min_uses;
XSRETURN_EMPTY;
}
- clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
-
- of.test_dir = 0;
- of.valid = clcf->open_file_cache_valid;
- of.min_uses = clcf->open_file_cache_min_uses;
- of.errors = clcf->open_file_cache_errors;
- of.events = clcf->open_file_cache_events;
-
path.len = ngx_strlen(filename);
path.data = ngx_pnalloc(r->pool, path.len + 1);
(void) ngx_cpystrn(path.data, filename, path.len + 1);
+ clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
+
+ of.uniq = 0;
+ of.test_dir = 0;
+ of.valid = clcf->open_file_cache_valid;
+ of.min_uses = clcf->open_file_cache_min_uses;
+ of.errors = clcf->open_file_cache_errors;
+ of.events = clcf->open_file_cache_events;
+
if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool)
!= NGX_OK)
{
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
+ of.uniq = 0;
of.test_dir = 0;
of.valid = clcf->open_file_cache_valid;
of.min_uses = clcf->open_file_cache_min_uses;