| | 2103 | /* opcode cache */ |
| | 2104 | PHP_INI_ENTRY1 ("xcache.size", "0", PHP_INI_SYSTEM, xc_OnUpdateDummy, NULL) |
| | 2105 | PHP_INI_ENTRY1 ("xcache.count", "1", PHP_INI_SYSTEM, xc_OnUpdateDummy, NULL) |
| | 2106 | PHP_INI_ENTRY1 ("xcache.slots", "8K", PHP_INI_SYSTEM, xc_OnUpdateDummy, NULL) |
| | 2107 | PHP_INI_ENTRY1 ("xcache.shm_scheme", "mmap", PHP_INI_SYSTEM, xc_OnUpdateString, &xc_shm_scheme) |
| | 2108 | PHP_INI_ENTRY1 ("xcache.ttl", "0", PHP_INI_SYSTEM, xc_OnUpdateULong, &xc_php_ttl) |
| | 2109 | PHP_INI_ENTRY1 ("xcache.gc_interval", "0", PHP_INI_SYSTEM, xc_OnUpdateULong, &xc_php_gc_interval) |
| | 2110 | /* var cache */ |
| | 2111 | PHP_INI_ENTRY1 ("xcache.var_size", "0", PHP_INI_SYSTEM, xc_OnUpdateDummy, NULL) |
| | 2112 | PHP_INI_ENTRY1 ("xcache.var_count", "1", PHP_INI_SYSTEM, xc_OnUpdateDummy, NULL) |
| | 2113 | PHP_INI_ENTRY1 ("xcache.var_slots", "8K", PHP_INI_SYSTEM, xc_OnUpdateDummy, NULL) |
| | 2114 | PHP_INI_ENTRY1 ("xcache.var_maxttl", "0", PHP_INI_SYSTEM, xc_OnUpdateULong, &xc_var_maxttl) |
| | 2115 | PHP_INI_ENTRY1 ("xcache.var_gc_interval", "120", PHP_INI_SYSTEM, xc_OnUpdateULong, &xc_var_gc_interval) |
| 2102 | | static int xc_config_string_disp(char *name, char *default_value) /* {{{ */ |
| 2103 | | { |
| 2104 | | char *value; |
| 2105 | | char buf[100]; |
| 2106 | | |
| 2107 | | if (cfg_get_string(name, &value) != SUCCESS) { |
| 2108 | | sprintf(buf, "%s (default)", default_value); |
| 2109 | | php_info_print_table_row(2, name, buf); |
| 2110 | | } |
| 2111 | | else { |
| 2112 | | php_info_print_table_row(2, name, value); |
| 2113 | | } |
| 2114 | | |
| 2115 | | return SUCCESS; |
| 2116 | | } |
| 2117 | | /* }}} */ |
| 2118 | | #define xc_config_hash_disp xc_config_string_disp |
| 2119 | | #define xc_config_long_disp xc_config_string_disp |
| 2168 | | php_info_print_table_start(); |
| 2169 | | php_info_print_table_header(2, "Directive ", "Value"); |
| 2170 | | xc_config_string_disp("xcache.shm_scheme", "mmap"); |
| 2171 | | xc_config_long_disp("xcache.size", "0"); |
| 2172 | | xc_config_hash_disp("xcache.count", "1"); |
| 2173 | | xc_config_hash_disp("xcache.slots", "8K"); |
| 2174 | | xc_config_hash_disp("xcache.ttl", "0"); |
| 2175 | | xc_config_hash_disp("xcache.gc_interval", "0"); |
| 2176 | | |
| 2177 | | xc_config_long_disp("xcache.var_size", "0"); |
| 2178 | | xc_config_hash_disp("xcache.var_count", "1"); |
| 2179 | | xc_config_hash_disp("xcache.var_slots", "8K"); |
| 2180 | | xc_config_hash_disp("xcache.var_maxttl", "0"); |
| 2181 | | xc_config_hash_disp("xcache.var_gc_interval", "300"); |
| 2182 | | php_info_print_table_end(); |
| 2183 | | |
| 2296 | | xc_config_long(&xc_php_ttl, "xcache.ttl", "0"); |
| 2297 | | xc_config_long(&xc_php_gc_interval, "xcache.gc_interval", "0"); |
| 2298 | | |
| 2299 | | xc_config_long(&xc_var_size, "xcache.var_size", "0"); |
| 2300 | | xc_config_hash(&xc_var_hcache, "xcache.var_count", "1"); |
| 2301 | | xc_config_hash(&xc_var_hentry, "xcache.var_slots", "8K"); |
| 2302 | | xc_config_long(&xc_var_maxttl, "xcache.var_maxttl", "0"); |
| 2303 | | xc_config_long(&xc_var_gc_interval, "xcache.var_gc_interval", "120"); |
| | 2275 | |
| | 2276 | xc_config_long(&xc_var_size, "xcache.var_size", "0"); |
| | 2277 | xc_config_hash(&xc_var_hcache, "xcache.var_count", "1"); |
| | 2278 | xc_config_hash(&xc_var_hentry, "xcache.var_slots", "8K"); |