$in["nocache"] = $in["nocache"] ?? false;

This commit is contained in:
CHIEFSOFT\ameye
2024-09-28 18:05:48 -04:00
parent 4bcf9db96e
commit d319eda408
+11 -3
View File
@@ -42,7 +42,10 @@ class WrenchBanners extends BaseController
//activetaskslist
private function bannerGetActiveTasks($in){
$in["action"] = WRENCHBOARD_JOB_USERACTIVE;
$endpoint = "BANNERS_ACTIVETASK-".str_replace("-", "_", $in["uid"]); // $in["uid"]; // str_pad($in["uid"], 12, "0", STR_PAD_LEFT);
$in["nocache"] = $in["nocache"] ?? false;
$endpoint = "BANNERS_ACTIVETASK-".str_replace("-", "_", $in["uid"]);
if ($in["nocache"]) $this->deleteCache($endpoint);
$wrenchboard = new \App\Models\BackendModel();
$out = $this->getCache($endpoint);
@@ -60,9 +63,11 @@ class WrenchBanners extends BaseController
}
private function bannerGetOffers($in){
$in["action"] = WRENCHBOARD_MOBILE_OFFERSLIST;
$endpoint = "BANNERS_OFFERS-". str_replace("-", "_", $in["uid"]); // $in["uid"];$in["uid"]; // str_pad($in["uid"], 12, "0", STR_PAD_LEFT);
$endpoint = "BANNERS_OFFERS-". str_replace("-", "_", $in["uid"]);
$wrenchboard = new \App\Models\BackendModel();
$in["nocache"] = $in["nocache"] ?? false;
if ($in["nocache"]) $this->deleteCache($endpoint);
$out = $this->getCache($endpoint);
if (count($out)==0){
$in["limit"] = 10;
@@ -83,7 +88,10 @@ class WrenchBanners extends BaseController
$in["uid"]=$in["uuid"];
}
$endpoint = "ACCOUNT_HOMEBANNERS-".str_replace("-", "_", $in["uid"]); // $in["uid"]; $in["uid"]; // str_pad($in["uid"], 12, "0", STR_PAD_LEFT);
$in["nocache"] = $in["nocache"] ?? false;
$endpoint = "ACCOUNT_HOMEBANNERS-".str_replace("-", "_", $in["uid"]);
if ($in["nocache"]) $this->deleteCache($endpoint);
$out = $this->getCache($endpoint); // try find in cache
if ( count($out) == 0 ){
$ret = $this->wrenchboard->wrenchboard_api($in, $out);