diff --git a/www-api/app/Config/Cache.php b/www-api/app/Config/Cache.php index 3dbea7a5..15a7d22e 100644 --- a/www-api/app/Config/Cache.php +++ b/www-api/app/Config/Cache.php @@ -153,7 +153,8 @@ class Cache extends BaseConfig * @var array */ public $redis = [ - 'host' => '10.0.0.32', + 'host_old' => '10.0.0.32', + 'host' => '172.16.4.20', 'password' => '7f079034e166ecf52d82cbec9876e4dc8a154b0c37248f3fa1734d4eeab938d5', 'port' => 6378, 'timeout' => 0, diff --git a/www-api/app/Controllers/BaseController.php b/www-api/app/Controllers/BaseController.php index 3bf759a0..44904f4d 100644 --- a/www-api/app/Controllers/BaseController.php +++ b/www-api/app/Controllers/BaseController.php @@ -38,6 +38,7 @@ abstract class BaseController extends Controller */ protected $helpers = []; private $cache_tag='NONE'; + private $cache_server="10.0.0.32"; /** * Constructor. */ @@ -50,6 +51,19 @@ abstract class BaseController extends Controller // E.g.: $this->session = \Config\Services::session(); $this->cache_tag = $this->getSiteConfigurations("system.cache_tag"); + $this->cache_server = $this->getSiteConfigurations("system.cache_host"); + + $redis = [ + 'host' => $this->cache_server, + 'password' => '7f079034e166ecf52d82cbec9876e4dc8a154b0c37248f3fa1734d4eeab938d5', + 'port' => 6378, + 'timeout' => 0, + 'database' => 0, + 'prefix' => 'WRB', + ]; + //$this->load->driver('cache', $redis); + + } public function getIpData(){