public static function enableCache($level = 1) { global $smarty; if (!Configuration::get('PS_SMARTY_CACHE')) { return; } if ($smarty->force_compile == 0 and $smarty->caching == $level) { return; } self::$_forceCompile = (int) $smarty->force_compile; self::$_caching = (int) $smarty->caching; $smarty->force_compile = 0; $smarty->caching = (int) $level; }