diff --git a/www-api/app/Controllers/WrenchAccount.php b/www-api/app/Controllers/WrenchAccount.php index 2b1bd45b..5bf007f7 100644 --- a/www-api/app/Controllers/WrenchAccount.php +++ b/www-api/app/Controllers/WrenchAccount.php @@ -58,8 +58,14 @@ class WrenchAccount extends BaseController $in["refer_link"] = str_replace('REFPROMO-', "", $in["refer_link"]); $in["action_path"] = 200; } - $ret = $this->wrenchboard->wrenchboard_api($in, $out); - $out['internal_return'] = $ret; + + $endpoint = "REFER_LINK-". $in["action_path"]."-". str_replace('-','_', $in["refer_link"]);// $in[""]; + $out = $this->getCache($endpoint); + if ( count($out)==0 ){ + $ret = $this->wrenchboard->wrenchboard_api($in, $out); + $out['internal_return'] = $ret; + $this->saveCache($endpoint,$out,360); + } return $this->respond( $this->summaryReturnData($in,$out), 200); } } \ No newline at end of file