From ea879c873f9f861084c8cb62a1cf1fab2dfe5784 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Fri, 6 Sep 2024 11:29:07 -0400 Subject: [PATCH] New refresh cache --- www-api/app/Controllers/AirFlow.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/www-api/app/Controllers/AirFlow.php b/www-api/app/Controllers/AirFlow.php index 1f3faa4f..006802a9 100644 --- a/www-api/app/Controllers/AirFlow.php +++ b/www-api/app/Controllers/AirFlow.php @@ -47,11 +47,18 @@ class AirFlow extends BaseController // public function flowInterestcount(){ - $raw_json = file_get_contents('php://input'); $in = json_decode($raw_json, true); $out =[]; log_message('critical', "AirFlow::flowInterestcount ********* ALL ".serialize($in) ); + + $endpoint = "WRENCH_JOB_INTEREST_COUNT"; + $res1 = $this->getCache($endpoint); + if (count($res1)==0){ + $local_url = "http://".$this->micro_service_net1.":3033/interestCount"; + $out = $this->APIcall('GET', $local_url, $in); + $this->saveCache($endpoint,$out,120); + } return []; //json_encode( $final_out ); } public function flowApproveReminder(){