cache added

This commit is contained in:
CHIEFSOFT\ameye
2024-11-30 12:49:28 -05:00
parent 97f4cf6cb4
commit 8cfb11fa95
+8 -2
View File
@@ -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);
}
}