Fix cache
This commit is contained in:
@@ -17,9 +17,16 @@ class WrenchJobs extends BaseController
|
|||||||
$in = json_decode($raw_json, true);
|
$in = json_decode($raw_json, true);
|
||||||
$in["action"] = WRENCHBOARD_JOB_STATS_INTEREST;
|
$in["action"] = WRENCHBOARD_JOB_STATS_INTEREST;
|
||||||
$out=[];
|
$out=[];
|
||||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
$endpoint = "CLIENT_STATS-". $in["client_id"];
|
||||||
$out['internal_return'] = $ret;
|
|
||||||
log_message('critical', "***** ***** WrenchJobs::interestStats Ret = ".$ret );
|
$out = $this->getCache($endpoint);
|
||||||
|
if ( count($out)==0 ){
|
||||||
|
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||||
|
$this->saveCache($endpoint,$out,15000);
|
||||||
|
$out['internal_return'] = $ret;
|
||||||
|
log_message('critical', "***** ***** WrenchJobs::interestStats Cache Done:::Ret ". $ret);
|
||||||
|
}
|
||||||
|
log_message('critical', "***** ***** WrenchJobs::interestStats Ret ");
|
||||||
return $this->respond( $this->summaryReturnData($in,$out), 200);
|
return $this->respond( $this->summaryReturnData($in,$out), 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user