delete cash
This commit is contained in:
parent
442ded2379
commit
0e2ad852b2
@ -2457,24 +2457,11 @@ class WsScores
|
||||
*/
|
||||
public function getListeBilans($siren)
|
||||
{
|
||||
$filename = 'listebilans-'.$siren;
|
||||
|
||||
if ($this->cacheWrite) {
|
||||
$cache = new Cache($filename);
|
||||
if ($cache->exist() && $this->cacheEnable ){
|
||||
return $cache->getBlock();
|
||||
}
|
||||
}
|
||||
|
||||
$params = new StdClass;
|
||||
$params->siren = $siren;
|
||||
$client = $this->loadClient('entreprise');
|
||||
try {
|
||||
$reponse = $client->getListeBilans($params);
|
||||
if ($this->cacheWrite) {
|
||||
$cache->deletefile();
|
||||
$cache->setBlock($reponse->getListeBilansResult);
|
||||
}
|
||||
return $reponse->getListeBilansResult;
|
||||
} catch (SoapFault $fault) {
|
||||
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
|
||||
@ -2592,25 +2579,12 @@ class WsScores
|
||||
*/
|
||||
public function getRatios($siren, $page = 'ratios')
|
||||
{
|
||||
$filename = 'ratios-'.$siren.'-'.$page;
|
||||
|
||||
if ($this->cacheWrite) {
|
||||
$cache = new Cache($filename);
|
||||
if ($cache->exist() && $this->cacheEnable ){
|
||||
return $cache->getBlock();
|
||||
}
|
||||
}
|
||||
|
||||
$params = new StdClass();
|
||||
$params->siren = $siren;
|
||||
$params->page = $page;
|
||||
$client = $this->loadClient('entreprise');
|
||||
try {
|
||||
$reponse = $client->getRatios($params);
|
||||
if ($this->cacheWrite) {
|
||||
$cache->deletefile();
|
||||
$cache->setBlock($reponse->getRatiosResult);
|
||||
}
|
||||
return $reponse->getRatiosResult;
|
||||
} catch (SoapFault $fault) {
|
||||
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
|
||||
|
Loading…
Reference in New Issue
Block a user