Index: /trunk/NEWS
===================================================================
--- /trunk/NEWS	(revision 1105)
+++ /trunk/NEWS	(revision 1106)
@@ -9,4 +9,5 @@
    * adds warning for misconfiguration @ startup
    * auto disable caching on crash @ runtime
+ * cache can be enabled/disabled manually
 
 2.0.1 2012-07-14
Index: /trunk/xcache-zh-gb2312.ini
===================================================================
--- /trunk/xcache-zh-gb2312.ini	(revision 1105)
+++ /trunk/xcache-zh-gb2312.ini	(revision 1106)
@@ -49,8 +49,9 @@
 
 
-; ½öÓÃÓÚ *nix ÏµÍ³
 ; ÉèÖÃÎª¿Õ(½ûÓÃ) »òÕßÀàËÆ "/tmp/phpcore/"
 ; ×¢Òâ¸ÃÄ¿Â¼Ó¦¸ÃÄÜ±» php Ð´ÈëÎÄ¼þ (¸ú open_basedir ÎÞ¹Ø)
 xcache.coredump_directory =   ""
+; disable cache after crash
+xcache.disable_on_crash =    Off
 
 ; ÆôÓÃÊµÑéÐÔ¹¦ÄÜ (Èç¹ûÓÐ)
Index: /trunk/xcache.c
===================================================================
--- /trunk/xcache.c	(revision 1105)
+++ /trunk/xcache.c	(revision 1106)
@@ -417,4 +417,5 @@
 {
 	HANDLE fileHandle;
+	LONG ret = EXCEPTION_CONTINUE_SEARCH;
 
 	SetUnhandledExceptionFilter(oldFilter);
@@ -436,5 +437,5 @@
 		if (ok) {
 			zend_error(E_ERROR, "Saved dump file to '%s'", crash_dumpPath);
-			return EXCEPTION_EXECUTE_HANDLER;
+			ret = EXCEPTION_EXECUTE_HANDLER;
 		}
 		else {
@@ -446,5 +447,10 @@
 	}
 
-	return EXCEPTION_CONTINUE_SEARCH;
+	if (xc_disable_on_crash) {
+		xc_disable_on_crash = 0;
+		xc_cacher_disable();
+	}
+
+	return ret;
 }
 /* }}} */
Index: /trunk/xcache.ini
===================================================================
--- /trunk/xcache.ini	(revision 1105)
+++ /trunk/xcache.ini	(revision 1106)
@@ -52,5 +52,5 @@
 ; make sure it's writable by php (open_basedir is not checked)
 xcache.coredump_directory =   ""
-; disable cache after crash until restart. (non-Win32 only)
+; disable cache after crash
 xcache.disable_on_crash =    Off
 
