コード例 #1
0
ファイル: Redis.php プロジェクト: im286er/LuckyPHP
 public function __construct()
 {
     parent::__construct();
     $redisHost = Configure::get('redis', 'host');
     $redisPort = Configure::get('redis', 'port');
     $this->connect($redisHost, $redisPort);
 }
コード例 #2
0
ファイル: test.php プロジェクト: im286er/LuckyPHP
 protected function redis()
 {
     $redis = new Redis();
     $redis->set('cache', 'test', 10);
     echo $redis->get('cache');
 }