當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Memcached::quit方法代碼示例

本文整理匯總了PHP中Memcached::quit方法的典型用法代碼示例。如果您正苦於以下問題:PHP Memcached::quit方法的具體用法?PHP Memcached::quit怎麽用?PHP Memcached::quit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Memcached的用法示例。


在下文中一共展示了Memcached::quit方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 public function setUp()
 {
     self::$memcached->flush();
     self::$memcached->quit();
     $this->storage = new MemcachedStorage(self::$memcached);
     $this->tokenBucket = new TokenBucket('test', $this->storage);
 }
開發者ID:fustundag,項目名稱:tokenbucket,代碼行數:7,代碼來源:TokenBucketTest.php

示例2: __destruct

 public function __destruct()
 {
     //Terminate active memcached connection.
     if (isset($this->cache)) {
         $this->cache->quit();
     }
 }
開發者ID:Covert-Inferno,項目名稱:reaction-toolkit,代碼行數:7,代碼來源:CacheManager.php

示例3: setUp

 public function setUp()
 {
     self::$memcached->flush();
     self::$memcached->quit();
     self::$memcached->set('found', array('count' => 5, 'time' => strtotime('2015-01-01 00:00:00')));
     self::$memcached->set('oldkey', 'old story');
     $this->storage = new MemcachedStorage(self::$memcached);
 }
開發者ID:fustundag,項目名稱:tokenbucket,代碼行數:8,代碼來源:MemcachedTest.php

示例4: __destruct

 public function __destruct()
 {
     if ($this->alive) {
         try {
             $this->instance->quit();
         } catch (BaseException $e) {
             // shhhh.
         }
     }
 }
開發者ID:justthefish,項目名稱:hesper,代碼行數:10,代碼來源:PeclMemcached.php

示例5: disconnect

 /**
  * Disconnect the open connection
  *
  * @return static
  */
 public function disconnect()
 {
     if ($this->_connection !== null) {
         if (method_exists($this->_connection, 'quit')) {
             $this->_connection->quit();
         }
     }
     $this->_connection = null;
     return $this;
 }
開發者ID:packaged,項目名稱:dal,代碼行數:15,代碼來源:MemcachedConnection.php

示例6: _after

 public function _after(TestCase $test)
 {
     $this->memcache->flush();
     switch (get_class($this->memcache)) {
         case 'Memcache':
             $this->memcache->close();
             break;
         case 'Memcached':
             $this->memcache->quit();
             break;
     }
 }
開發者ID:Marfuz,項目名稱:c4t_test,代碼行數:12,代碼來源:Memcache.php

示例7: close

 /**
  * Close connection to memcache server
  *
  * @return bool
  */
 protected function close()
 {
     if (!$this->is_connected) {
         return false;
     }
     return $this->memcached->quit();
 }
開發者ID:nmardones,項目名稱:PrestaShop,代碼行數:12,代碼來源:CacheMemcached.php

示例8: __destruct

 /**
  * Destroy the connections.
  */
 public function __destruct()
 {
     switch (NN_CACHE_TYPE) {
         case self::TYPE_REDIS:
             $this->server->close();
             break;
         case self::TYPE_MEMCACHED:
             $this->server->quit();
             break;
     }
 }
開發者ID:RickDB,項目名稱:newznab-tmux,代碼行數:14,代碼來源:Cache.php

示例9: close

 /**
  * Close
  *
  * Releases locks and closes connection.
  *
  * @return	bool
  */
 public function close()
 {
     if (isset($this->_memcached)) {
         isset($this->_lock_key) && $this->_memcached->delete($this->_lock_key);
         if (!$this->_memcached->quit()) {
             return $this->_failure;
         }
         $this->_memcached = NULL;
         return $this->_success;
     }
     return $this->_failure;
 }
開發者ID:SaiAshirwadInformatia,項目名稱:TaskTracker,代碼行數:19,代碼來源:Session_memcached_driver.php

示例10: close

 /**
  * Close
  *
  * Releases locks and closes connection.
  *
  * @return    bool
  */
 public function close()
 {
     if (isset($this->memcached)) {
         isset($this->lockKey) && $this->memcached->delete($this->lockKey);
         if (!$this->memcached->quit()) {
             return false;
         }
         $this->memcached = null;
         return true;
     }
     return false;
 }
開發者ID:titounnes,項目名稱:CodeIgniter4,代碼行數:19,代碼來源:MemcachedHandler.php

示例11: close

 /**
  * Close
  *
  * Releases locks and closes connection.
  *
  * @return	bool
  */
 public function close()
 {
     if (isset($this->_memcached)) {
         $this->_release_lock();
         if (!$this->_memcached->quit()) {
             return $this->_fail();
         }
         $this->_memcached = NULL;
         return $this->_success;
     }
     return $this->_fail();
 }
開發者ID:wpshang,項目名稱:wps,代碼行數:19,代碼來源:Session_memcached_driver.php

示例12: close

 /**
  * Close
  *
  * Releases locks and closes connection.
  *
  * @return    bool
  */
 public function close()
 {
     if (isset($this->_memcached)) {
         isset($this->_lock_key) && $this->_memcached->delete($this->_lock_key);
         if (!$this->_memcached->quit()) {
             return FALSE;
         }
         $this->_memcached = NULL;
         return TRUE;
     }
     return FALSE;
 }
開發者ID:lkho,項目名稱:comp3421,代碼行數:19,代碼來源:Session_memcached_driver.php

示例13: maybeAddServerConnections

 /**
  * Maybe add server connections.
  *
  * @since 151216 Memcached utilities.
  */
 protected function maybeAddServerConnections()
 {
     if (!$this->Pool) {
         return;
         // Not possible.
     }
     if ($this->serversDiffer()) {
         $this->Pool->quit();
         $this->Pool->resetServerList();
         $this->Pool->addServers($this->servers);
     }
 }
開發者ID:websharks,項目名稱:core,代碼行數:17,代碼來源:Memcache.php

示例14: tearDown

 /**
  * @inheritDoc
  */
 protected function tearDown()
 {
     parent::tearDown();
     /* Close all active connections. */
     $this->client->quit();
 }
開發者ID:ebidtech,項目名稱:cache-client,代碼行數:9,代碼來源:MemcachedProviderServiceTest.php

示例15: _close

 /**
  * Closes connection to server(s)
  */
 protected function _close()
 {
     return $this->_connection->quit();
 }
開發者ID:behance,項目名稱:nbd.php-cache,代碼行數:7,代碼來源:MemcachedAdapter.php


注:本文中的Memcached::quit方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。