当前位置: 首页>>代码示例>>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;未经允许,请勿转载。