mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°7405 - ✅ Fix unit tests
This commit is contained in:
@@ -60,14 +60,15 @@ function apc_store($key, $var = NULL, $ttl = 0)
|
|||||||
*/
|
*/
|
||||||
function apc_fetch($key)
|
function apc_fetch($key)
|
||||||
{
|
{
|
||||||
if (is_array($key))
|
if (is_array($key)) {
|
||||||
{
|
$aResult = [];
|
||||||
$aResult = array();
|
foreach ($key as $sKey) {
|
||||||
foreach($key as $sKey)
|
|
||||||
{
|
|
||||||
$aResult[$sKey] = apcFile::FetchOneFile($sKey);
|
$aResult[$sKey] = apcFile::FetchOneFile($sKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $aResult;
|
return $aResult;
|
||||||
|
} elseif (is_null($key)) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return apcFile::FetchOneFile($key);
|
return apcFile::FetchOneFile($key);
|
||||||
}
|
}
|
||||||
@@ -214,7 +215,12 @@ class apcFile
|
|||||||
if (empty($sKey)) {
|
if (empty($sKey)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (is_file(self::GetCacheFileName($sKey))) {
|
||||||
|
@unlink(self::GetCacheFileName($sKey));
|
||||||
|
}
|
||||||
|
if (is_file(self::GetCacheFileName('-'.$sKey))) {
|
||||||
|
@unlink(self::GetCacheFileName('-'.$sKey));
|
||||||
|
}
|
||||||
if ($iTTL > 0) {
|
if ($iTTL > 0) {
|
||||||
// hint for ttl management
|
// hint for ttl management
|
||||||
$sKey = '-'.$sKey;
|
$sKey = '-'.$sKey;
|
||||||
|
|||||||
Reference in New Issue
Block a user