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