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