mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 23:36:18 +00:00
Enable PHP APC cache for AMS smarty
This commit is contained in:
parent
66c30a14cc
commit
e7f7f13ca1
1 changed files with 6 additions and 0 deletions
|
@ -23,6 +23,8 @@ class Helpers {
|
||||||
global $AMS_TRANS;
|
global $AMS_TRANS;
|
||||||
global $INGAME_LAYOUT;
|
global $INGAME_LAYOUT;
|
||||||
global $AMS_CACHEDIR;
|
global $AMS_CACHEDIR;
|
||||||
|
global $AMS_PLUGINS;
|
||||||
|
|
||||||
// define('SMARTY_SPL_AUTOLOAD',1);
|
// define('SMARTY_SPL_AUTOLOAD',1);
|
||||||
require_once $AMS_LIB . '/smarty/libs/Smarty.class.php';
|
require_once $AMS_LIB . '/smarty/libs/Smarty.class.php';
|
||||||
spl_autoload_register( '__autoload' );
|
spl_autoload_register( '__autoload' );
|
||||||
|
@ -37,8 +39,12 @@ class Helpers {
|
||||||
$smarty -> caching = false;
|
$smarty -> caching = false;
|
||||||
$smarty -> cache_lifetime = 300;
|
$smarty -> cache_lifetime = 300;
|
||||||
|
|
||||||
|
$smarty->setPluginsDir($AMS_PLUGINS);
|
||||||
|
|
||||||
if (function_exists('apc_cache_info')) {
|
if (function_exists('apc_cache_info')) {
|
||||||
// production
|
// production
|
||||||
|
$smarty->caching = true;
|
||||||
|
$smarty->setCachingType("apc");
|
||||||
$smarty->compile_check = false;
|
$smarty->compile_check = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue