Wrench Jobs

This commit is contained in:
CHIEFSOFT\ameye
2024-02-24 14:17:02 -05:00
parent a72f4192aa
commit 9651fd0a40
3 changed files with 133 additions and 7 deletions
@@ -52,6 +52,17 @@ abstract class BaseController extends Controller
$this->cache_tag = $this->getSiteConfigurations("system.cache_tag");
}
public function getIpData(){
//$ip_loc="0.0.0.0";
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip_loc = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip_loc = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip_loc = $_SERVER['REMOTE_ADDR'];
}
return $ip_loc;
}
public function saveCache($cacheKey,$data,$timeLine=5000){
$cacheKey = $this->cache_tag."-".$cacheKey;
// $cache = \Config\Services::cache();