$in["nocache"] = $in["nocache"] ?? false;
This commit is contained in:
@@ -42,7 +42,10 @@ class WrenchBanners extends BaseController
|
|||||||
//activetaskslist
|
//activetaskslist
|
||||||
private function bannerGetActiveTasks($in){
|
private function bannerGetActiveTasks($in){
|
||||||
$in["action"] = WRENCHBOARD_JOB_USERACTIVE;
|
$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();
|
$wrenchboard = new \App\Models\BackendModel();
|
||||||
|
|
||||||
$out = $this->getCache($endpoint);
|
$out = $this->getCache($endpoint);
|
||||||
@@ -60,9 +63,11 @@ class WrenchBanners extends BaseController
|
|||||||
}
|
}
|
||||||
private function bannerGetOffers($in){
|
private function bannerGetOffers($in){
|
||||||
$in["action"] = WRENCHBOARD_MOBILE_OFFERSLIST;
|
$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();
|
$wrenchboard = new \App\Models\BackendModel();
|
||||||
|
|
||||||
|
$in["nocache"] = $in["nocache"] ?? false;
|
||||||
|
if ($in["nocache"]) $this->deleteCache($endpoint);
|
||||||
$out = $this->getCache($endpoint);
|
$out = $this->getCache($endpoint);
|
||||||
if (count($out)==0){
|
if (count($out)==0){
|
||||||
$in["limit"] = 10;
|
$in["limit"] = 10;
|
||||||
@@ -83,7 +88,10 @@ class WrenchBanners extends BaseController
|
|||||||
$in["uid"]=$in["uuid"];
|
$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
|
$out = $this->getCache($endpoint); // try find in cache
|
||||||
if ( count($out) == 0 ){
|
if ( count($out) == 0 ){
|
||||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||||
|
|||||||
Reference in New Issue
Block a user