Cache protection

This commit is contained in:
CHIEFSOFT\ameye
2024-08-26 10:22:31 -04:00
parent e27fad7415
commit 150e2490f0
+5 -2
View File
@@ -57,11 +57,14 @@ class WrenchJobs extends BaseController
if( is_array($out)){
$countItem = count($out);
}
if ( $countItem == 0 ){
$local_url = "http://".$this->micro_service_net1.":3033/marketjobs";
$out = $this->APIcall('GET', $local_url, $in);
$this->saveCache($endpoint,$out,3000);
// dont cache junk
if ( is_array($out) && is_array($out["result_list"]) && count($out["result_list"]) > 0){
$this->saveCache($endpoint,$out,180);
}
$out['internal_return'] = 0; // just backwad comaptobility
log_message('critical', "***** ***** WrenchJobs::getJobsData Cache Done:::Ret ");
}