From c900def3456fe43930161126c7822fe1ec7cc003 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 8 Aug 2024 09:52:43 -0400 Subject: [PATCH] dont cache eror --- www-api/app/Controllers/WrenchGeneralData.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www-api/app/Controllers/WrenchGeneralData.php b/www-api/app/Controllers/WrenchGeneralData.php index 612399b1..9b861019 100644 --- a/www-api/app/Controllers/WrenchGeneralData.php +++ b/www-api/app/Controllers/WrenchGeneralData.php @@ -40,7 +40,9 @@ class WrenchGeneralData extends BaseController if ( empty($out) || !is_array($out)){ $ret = $this->wrenchboard->wrenchboard_api($in, $out); $out['internal_return'] = $ret; - $this->saveCache($endpoint,$out,25000); + if ($ret > 0 ){ // dont cache error + $this->saveCache($endpoint,$out,25000); + } } return $this->summaryReturnData($in,$out); //json_encode( $final_out ); }