示例#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;
     }
 }