}
}
-#if defined(V8_MAJOR_VERSION) && V8_MAJOR_VERSION >=5
- if (zstr(globals.script_caching)) {
- globals.script_caching = switch_core_strdup(globals.pool, "disabled");
- }
-#endif
-
for (hook = switch_xml_child(settings, "hook"); hook; hook = hook->next) {
char *event = (char *)switch_xml_attr_soft(hook, "event");
char *subclass = (char *)switch_xml_attr_soft(hook, "subclass");
Do not cache if the caching is disabled
Do not cache inline scripts
*/
- if (!strcasecmp(globals.script_caching, "disabled") || !strcasecmp(globals.script_caching, "false") || !strcasecmp(globals.script_caching, "no") || !strcasecmp(script_file, "inline") || zstr(script_file)) {
+ if (!switch_true(globals.script_caching) || !strcasecmp(script_file, "inline") || zstr(script_file)) {
options = ScriptCompiler::kNoCompileOptions;
perf_log("Javascript caching is disabled.\n", script_file);
} else {
globals.v8platform = NULL;
globals.cache_expires_seconds = 0;
globals.performance_monitor = false;
+ globals.script_caching = switch_core_strdup(globals.pool, "disabled");
+
JSMain::Initialize(&globals.v8platform);
switch_core_hash_init(&globals.compiled_script_hash);