/** * @param Config $config * * @return \Memcache * * @throws ModuleIsNotInstalled */ public function create(Config $config) { $memcache = new \Memcache(); $memcache->connect($config->getHost(), $config->getPort()); return $memcache; }
/** * @param Config $config * * @return \Redis */ public function create(Config $config) { $redis = new \Redis(); $redis->connect($config->getHost(), $config->getPort()); return $redis; }
/** * @param Config $config * * @return \Memcached */ public function create(Config $config) { $memcached = new \Memcached(); $memcached->addServer($config->getHost(), $config->getPort()); return $memcached; }