예제 #1
0
파일: Redis.php 프로젝트: guadin/pylon
 public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
예제 #2
0
 public static function initCache()
 {
     global $config;
     if ($config["cache"]["status"] == true) {
         if ($config["cache"]["driver"] == "redis") {
             include 'lib/Redis.php';
             include 'Redis.php';
             return PylonRedis::getInstance();
         }
     } else {
         return null;
     }
 }