/**
  * Записывает массив с данными временного аккаунта
  * @param $newData array('free'=>array('login'=>'test', 'pass'=>'testPass'))
  * @return bool
  */
 public static function configSet($newData)
 {
     $memcache = new \Memcache();
     $memcache->addServer('localhost', 11211);
     $memcache->flush();
     try {
         return $memcache->set($newData, 'Login');
     } catch (\Exception $e) {
         ExpectedException::throwException('2', 'Error write to memcache', '');
     }
 }
Esempio n. 2
0
 /**
  * Flushes all Memcached data.
  */
 public function clearMemcache()
 {
     $this->memcache->flush();
 }