Example #1
0
 public function getRedis()
 {
     if (self::$redis == null) {
         self::$redis = new Redis();
     }
     return self::$redis;
 }
Example #2
0
 public static function setCache($cacheName)
 {
     $cache = CacheManager::getCache($cacheName);
     if (!$cache) {
         throw new \Exception('Invalid cache');
     }
     self::$_cache = $cache;
 }