Fixed the "Reset(APC)Cache" at the end of the installation.

SVN:trunk[2310]
This commit is contained in:
Denis Flaven
2012-10-20 15:42:39 +00:00
parent a48d2f97e8
commit 135abdb9e0
2 changed files with 6 additions and 6 deletions

View File

@@ -5076,18 +5076,18 @@ abstract class MetaModel
return $aEntries;
}
public static function ResetCache($sEnvironment = null)
public static function ResetCache($sEnvironmentId = null)
{
if (!function_exists('apc_delete')) return;
if (is_null($sEnvironment))
if (is_null($sEnvironmentId))
{
$sEnvironment = MetaModel::GetEnvironmentId();
$sEnvironmentId = MetaModel::GetEnvironmentId();
}
$sAppIdentity = 'itop-'.$sEnvironment;
$sAppIdentity = 'itop-'.$sEnvironmentId;
Dict::ResetCache($sAppIdentity);
foreach(self::GetCacheEntries($sEnvironment) as $sKey => $aAPCInfo)
foreach(self::GetCacheEntries($sEnvironmentId) as $sKey => $aAPCInfo)
{
$sAPCKey = $aAPCInfo['info'];
apc_delete($sAPCKey);

View File

@@ -783,6 +783,6 @@ class ApplicationInstaller
// Ready to go !!
require_once(APPROOT.'core/dict.class.inc.php');
MetaModel::ResetCache($sTargetEnvironment);
MetaModel::ResetCache();
}
}