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


PHP Memcache::delete方法代碼示例

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


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

示例1: delete

 /**
  * Delete an item from the memcache server
  *
  * @param string $key
  * @return
  */
 public function delete($key)
 {
     if (!$this->hasMemcache) {
         return false;
     }
     return $this->memcache->delete($key);
 }
開發者ID:TMBaay,項目名稱:MEDTrip---Healthcareabroad,代碼行數:13,代碼來源:MemcacheService.php

示例2: delete

 function delete($key)
 {
     if (null === $this->memcache) {
         $this->connect();
     }
     return $this->memcache->delete($key);
 }
開發者ID:php-yaoi,項目名稱:php-yaoi,代碼行數:7,代碼來源:Memcache.php

示例3: dropAll

 public function dropAll()
 {
     foreach ($this->cache->get(self::INTERNAL_PREFIX . 'all-keys') as $key) {
         $this->drop($key);
     }
     $this->cache->delete(self::INTERNAL_PREFIX . 'all-data');
 }
開發者ID:nicklasos,項目名稱:ConfigServer,代碼行數:7,代碼來源:Cache.php

示例4: remove

 public function remove($key)
 {
     if (\Kalibri::config()->get('debug.log.is-enabled', false)) {
         \Kalibri::logger()->add(\Kalibri\Logger\Base::L_DEBUG, 'REMOVE: ' . $key, $this);
     }
     unset($this->_local[$key]);
     return $this->_memcache->delete($key);
 }
開發者ID:tenebras,項目名稱:kalibri,代碼行數:8,代碼來源:Memcache.php

示例5: delete

 /**
  * Remove values from cache.
  *
  * @param array $keys list of keys to delete
  *
  * @return bool true on success, false on failure
  */
 protected function delete(array $keys)
 {
     foreach ($keys as $k) {
         $k = sha1($k);
         $this->memcache->delete($k);
     }
     return true;
 }
開發者ID:prinsich,項目名稱:tesis-aus,代碼行數:15,代碼來源:cacheresource.memcache.php

示例6: releaseLock

 /**
  * Release lock
  *
  * @param string $name name of lock
  * @return bool
  */
 public function releaseLock($name)
 {
     if (isset($this->keys[$name]) && $this->memcache->delete($name)) {
         unset($this->keys[$name]);
         return true;
     }
     return false;
 }
開發者ID:socloz,項目名稱:ninja-mutex,代碼行數:14,代碼來源:MemcacheLockAbstract.php

示例7: removeTag

 /**
  * @inheritdoc
  */
 public function removeTag($tag)
 {
     $tag = $this->prepareTag($tag);
     if (($value = $this->storage->get($tag)) === false) {
         return false;
     }
     $value = $this->unserialize($value);
     $value[] = $tag;
     foreach ($value as $key) {
         $this->storage->delete($key);
     }
     return true;
 }
開發者ID:romeoz,項目名稱:rock-cache,代碼行數:16,代碼來源:Memcache.php

示例8: delete

 /**
  * Delete cache item with given key
  * @param string $key
  */
 public function delete($key)
 {
     if (empty($key)) {
         throw new InvalidArgumentException("\$key is empty");
     }
     return $this->memcache->delete($key);
 }
開發者ID:Welvin,項目名稱:stingle,代碼行數:11,代碼來源:MemcacheWrapper.class.php

示例9: remove

 /**
  * Removes a cache record.
  *
  * @param string $id Cache id
  *
  * @return boolean TRUE if cache is removed FALSE otherwise
  */
 public function remove($id)
 {
     if (false === $this->_cache->delete($id)) {
         return $this->_onError('remove');
     }
     return true;
 }
開發者ID:mickaelsteinberg,項目名稱:BackBee,代碼行數:14,代碼來源:AbstractMemcache.php

示例10: expire

 /**
  * 設定該k一個過期時間
  * @param int $expire 在$expire秒後過期
  */
 public function expire($expire)
 {
     if ($expire <= 0) {
         return FALSE;
     }
     return $this->mc->delete($this->k, $expire);
 }
開發者ID:seepre,項目名稱:api.seepre.com,代碼行數:11,代碼來源:MemModel.php

示例11: delete

 /**
  * Attempt to remove a key value pair from memcache.
  *
  * @param string $key index to remove from memcache
  * @param int $delay - Length of time before deletion. (0 = immediately; n = seconds)
  * @return bool
  **/
 public function delete($key, $delay = 0)
 {
     if ($this->open()) {
         return $this->memcache->delete($key, $delay);
     }
     return false;
 }
開發者ID:nesbert,項目名稱:nobjects,代碼行數:14,代碼來源:Data.php

示例12: Delete

	/**
	 * @param string $sKey
	 *
	 * @return void
	 */
	public function Delete($sKey)
	{
		if ($this->oMem)
		{
			$this->oMem->delete($this->generateCachedKey($sKey));
		}
	}
開發者ID:pombredanne,項目名稱:ArcherSys,代碼行數:12,代碼來源:Memcache.php

示例13: destroy

 /**
  * destroy of the session
  *
  * @param string $sessionId
  * @return bool
  */
 public function destroy($sessionId)
 {
     $this->_memcache->delete(Kwf_Cache_Simple::getUniquePrefix() . 'sess-' . $sessionId);
     $this->_memcache->delete(Kwf_Cache_Simple::getUniquePrefix() . 'sess-db-' . $sessionId);
     Kwf_Registry::get('db')->query("DELETE FROM kwf_sessions WHERE sessionId=?", $sessionId);
     return true;
 }
開發者ID:xiaoguizhidao,項目名稱:koala-framework,代碼行數:13,代碼來源:SessionHandler.php

示例14: _deleteMulti

 /**
  * Simulates multiDelete operation, since Memcache extension does not support
  *
  * {@inheritDoc}
  *
  * @see http://www.php.net/manual/en/memcache.delete.php
  */
 protected function _deleteMulti(array $keys)
 {
     foreach ($keys as $key) {
         $this->_connection->delete($key);
     }
     return true;
 }
開發者ID:behance,項目名稱:nbd.php-cache,代碼行數:14,代碼來源:MemcacheAdapter.php

示例15: destroy

 /**
  * Destroy a session.
  * Expects a session id.
  * @param string $sessionId
  * @return boolean
  */
 public function destroy($sessionId = '')
 {
     if ($sessionId !== '') {
         $this->_memcache->delete($this->_key($sessionId));
     }
     return true;
 }
開發者ID:hubvioos,項目名稱:42framework,代碼行數:13,代碼來源:MemcacheHandler.php


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