1
0
Fork 0

disable XCache for cli correctly

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@570 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 15 years ago
parent 69c693df21
commit f39afa916d

@ -3052,24 +3052,24 @@ static PHP_MINIT_FUNCTION(xcache)
#endif
REGISTER_INI_ENTRIES();
xc_config_long(&xc_php_size, "xcache.size", "0");
xc_config_hash(&xc_php_hcache, "xcache.count", "1");
xc_config_hash(&xc_php_hentry, "xcache.slots", "8K");
xc_config_long(&xc_var_size, "xcache.var_size", "0");
xc_config_hash(&xc_var_hcache, "xcache.var_count", "1");
xc_config_hash(&xc_var_hentry, "xcache.var_slots", "8K");
if (strcmp(sapi_module.name, "cli") == 0) {
if ((env = getenv("XCACHE_TEST")) != NULL) {
zend_alter_ini_entry("xcache.test", sizeof("xcache.test"), env, strlen(env) + 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP);
}
if (!xc_test) {
/* disable cache for cli except for test */
/* disable cache for cli except for testing */
xc_php_size = xc_var_size = 0;
}
}
xc_config_long(&xc_php_size, "xcache.size", "0");
xc_config_hash(&xc_php_hcache, "xcache.count", "1");
xc_config_hash(&xc_php_hentry, "xcache.slots", "8K");
xc_config_long(&xc_var_size, "xcache.var_size", "0");
xc_config_hash(&xc_var_hcache, "xcache.var_count", "1");
xc_config_hash(&xc_var_hentry, "xcache.var_slots", "8K");
if (xc_php_size <= 0) {
xc_php_size = xc_php_hcache.size = 0;
}

Loading…
Cancel
Save