2
0
forked from Wavyzz/dolibarr

Clean code

This commit is contained in:
Laurent Destailleur
2024-01-05 03:41:22 +01:00
parent bbf687da0c
commit ccaae7ab24
30 changed files with 53 additions and 90 deletions

View File

@@ -118,7 +118,7 @@ function dol_setcache($memoryid, $data, $expire = 0)
} else {
return -1;
}
} elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { // This is a really not reliable cache ! Use Memcached instead.
} elseif (getDolGlobalInt('MAIN_OPTIMIZE_SPEED') & 0x02) { // This is a really not reliable cache ! Use Memcached instead.
// Using shmop
$result = dol_setshmop($memoryid, $data, $expire);
} else {
@@ -194,7 +194,7 @@ function dol_getcache($memoryid)
} else {
return null; // There is no way to make a difference between NOTFOUND and error when using Memcache. So do not use it, use Memcached instead.
}
} elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { // This is a really not reliable cache ! Use Memcached instead.
} elseif (getDolGlobalInt('MAIN_OPTIMIZE_SPEED') & 0x02) { // This is a really not reliable cache ! Use Memcached instead.
// Using shmop
$data = dol_getshmop($memoryid);
return $data;