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