N°7803 - MTP from itophub/designer failing in itop 3.2.0

This commit is contained in:
Eric Espie
2024-12-16 16:44:59 +01:00
parent 8647a76dbf
commit 32ef639ce1
5 changed files with 48 additions and 15 deletions

View File

@@ -1451,9 +1451,12 @@ class utils
* @return string A path to a folder into which any module can store cache data
* The corresponding folder is created or cleaned upon code compilation
*/
public static function GetCachePath()
public static function GetCachePath(string $sEnvironment = null): string
{
return static::GetDataPath().'cache-'.MetaModel::GetEnvironment().'/';
if (is_null($sEnvironment)) {
$sEnvironment = MetaModel::GetEnvironment();
}
return static::GetDataPath()."cache-$sEnvironment/";
}
/**