Cache protection
This commit is contained in:
@@ -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 ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user