open_file_cache_events
diff --git a/src/core/ngx_open_file_cache.c b/src/core/ngx_open_file_cache.c
index 1dc2d13..87104a0 100644
--- a/src/core/ngx_open_file_cache.c
+++ b/src/core/ngx_open_file_cache.c
@@ -353,8 +353,10 @@
 
 update:
 
-    if (ngx_event_flags & NGX_USE_VNODE_EVENT && of->fd != NGX_INVALID_FILE) {
-
+    if ((ngx_event_flags & NGX_USE_VNODE_EVENT)
+        && of->events
+        && of->fd != NGX_INVALID_FILE)
+    {
         file->event = ngx_calloc(sizeof(ngx_event_t), pool->log);
         if (file->event== NULL) {
             goto failed;
diff --git a/src/core/ngx_open_file_cache.h b/src/core/ngx_open_file_cache.h
index 90c7590..cc0d899 100644
--- a/src/core/ngx_open_file_cache.h
+++ b/src/core/ngx_open_file_cache.h
@@ -23,6 +23,7 @@
 
     unsigned                 test_dir:1;
     unsigned                 errors:1;
+    unsigned                 events:1;
 
     unsigned                 is_dir:1;
     unsigned                 is_file:1;
diff --git a/src/http/modules/ngx_http_flv_module.c b/src/http/modules/ngx_http_flv_module.c
index ad0d5bd..04327d9 100644
--- a/src/http/modules/ngx_http_flv_module.c
+++ b/src/http/modules/ngx_http_flv_module.c
@@ -109,6 +109,7 @@
     of.test_dir = 0;
     of.retest = clcf->open_file_cache_retest;
     of.errors = clcf->open_file_cache_errors;
+    of.events = clcf->open_file_cache_events;
     
     rc = ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool);
 
diff --git a/src/http/modules/ngx_http_index_module.c b/src/http/modules/ngx_http_index_module.c
index f3f2b61..6f81a49 100644
--- a/src/http/modules/ngx_http_index_module.c
+++ b/src/http/modules/ngx_http_index_module.c
@@ -236,6 +236,7 @@
         of.test_dir = 0;
         of.retest = clcf->open_file_cache_retest;
         of.errors = clcf->open_file_cache_errors;
+        of.events = clcf->open_file_cache_events;
 
         rc = ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool);
 
diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c
index aa5e72e..9278497 100644
--- a/src/http/modules/ngx_http_static_module.c
+++ b/src/http/modules/ngx_http_static_module.c
@@ -100,6 +100,7 @@
     of.test_dir = 0;
     of.retest = clcf->open_file_cache_retest;
     of.errors = clcf->open_file_cache_errors;
+    of.events = clcf->open_file_cache_events;
 
     rc = ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool);
 
diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs
index 8b7ef22..24379ad 100644
--- a/src/http/modules/perl/nginx.xs
+++ b/src/http/modules/perl/nginx.xs
@@ -641,6 +641,7 @@
     of.test_dir = 0;
     of.retest = clcf->open_file_cache_retest; 
     of.errors = clcf->open_file_cache_errors; 
+    of.events = clcf->open_file_cache_events; 
 
     path.len = ngx_strlen(filename);
 
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 9a52678..b25346d 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -471,6 +471,13 @@
       offsetof(ngx_http_core_loc_conf_t, open_file_cache_errors),
       NULL },
 
+    { ngx_string("open_file_cache_events"),
+      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
+      ngx_conf_set_flag_slot,
+      NGX_HTTP_LOC_CONF_OFFSET,
+      offsetof(ngx_http_core_loc_conf_t, open_file_cache_events),
+      NULL },
+
       ngx_null_command
 };
 
@@ -2375,6 +2382,7 @@
     lcf->open_file_cache = NGX_CONF_UNSET_PTR;
     lcf->open_file_cache_retest = NGX_CONF_UNSET;
     lcf->open_file_cache_errors = NGX_CONF_UNSET;
+    lcf->open_file_cache_events = NGX_CONF_UNSET;
 
     return lcf;
 }
@@ -2567,6 +2575,9 @@
     ngx_conf_merge_sec_value(conf->open_file_cache_errors,
                              prev->open_file_cache_errors, 0);
 
+    ngx_conf_merge_sec_value(conf->open_file_cache_events,
+                             prev->open_file_cache_events, 0);
+
     return NGX_CONF_OK;
 }
 
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h
index 5455c5c..2bd687e 100644
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -293,6 +293,7 @@
     ngx_open_file_cache_t  *open_file_cache;
     time_t        open_file_cache_retest;
     ngx_flag_t    open_file_cache_errors;
+    ngx_flag_t    open_file_cache_events;
 
     ngx_log_t    *err_log;
 
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c
index 78c4272..b19ee91 100644
--- a/src/http/ngx_http_script.c
+++ b/src/http/ngx_http_script.c
@@ -977,6 +977,7 @@
     of.test_dir = 0;
     of.retest = clcf->open_file_cache_retest;
     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_ERROR)