mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°8772 - Fix broken cache
This commit is contained in:
@@ -49,14 +49,15 @@ class DataModelDependantCache
|
||||
// NULL cannot be stored as it collides with Fetch() returning NULL when the key does not exist
|
||||
throw new Exception('Cannot store NULL in the cache');
|
||||
}
|
||||
$sCacheFileName = $this->MakeCacheFileName($sPool, $sKey);
|
||||
SetupUtils::builddir(dirname($sCacheFileName));
|
||||
|
||||
$sMoreInfo = '';
|
||||
foreach ($aMoreInfo as $sKey => $sValue) {
|
||||
$sMoreInfo .= "\n// $sKey: $sValue";
|
||||
}
|
||||
$sCacheContent = "<?php $sMoreInfo\nreturn ".var_export($value, true).';';
|
||||
|
||||
$this->StorePhpContent($sPool, $sKey, $sCacheContent);
|
||||
file_put_contents($sCacheFileName, $sCacheContent, LOCK_EX);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user