Experimental support of APC to speed-up the application.

SVN:trunk[1143]
This commit is contained in:
Denis Flaven
2011-03-23 14:09:39 +00:00
parent 3790c8f7d5
commit c9b4468f17

View File

@@ -231,5 +231,33 @@ class Dict
{
MyHelpers::var_dump_html(self::$m_aData);
}
public static function InCache()
{
if (function_exists('apc_fetch'))
{
$bResult = false;
self::$m_aData = apc_fetch('dict', $bResult);
if (!$bResult)
{
self::$m_aData = array();
}
else
{
self::$m_aLanguages = apc_fetch('languages', $bResult);
}
return $bResult;
}
return false;
}
public static function InitCache()
{
if (function_exists('apc_store'))
{
apc_store('languages', self::$m_aLanguages);
apc_store('dict', self::$m_aData);
}
}
}
?>