当前位置: 首页>>代码示例>>PHP>>正文


PHP apc_delete函数代码示例

本文整理汇总了PHP中apc_delete函数的典型用法代码示例。如果您正苦于以下问题:PHP apc_delete函数的具体用法?PHP apc_delete怎么用?PHP apc_delete使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了apc_delete函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: del

 public static function del($key)
 {
     ApcCache::check();
     $res = false;
     apc_fetch($key, $res);
     return $res ? apc_delete($key) : true;
 }
开发者ID:natxet,项目名称:operacore,代码行数:7,代码来源:ApcCache.php

示例2: clean

 public function clean($baseDir, $initDir = false, $filename = false)
 {
     if (strlen($filename)) {
         $baseDirVersion = apc_fetch($this->sid . $baseDir);
         if ($baseDirVersion === false) {
             return true;
         }
         if ($initDir !== false) {
             $initDirVersion = apc_fetch($baseDirVersion . "|" . $initDir);
             if ($initDirVersion === false) {
                 return true;
             }
         } else {
             $initDirVersion = "";
         }
         apc_delete($baseDirVersion . "|" . $initDirVersion . "|" . $filename);
     } else {
         if (strlen($initDir)) {
             $baseDirVersion = apc_fetch($this->sid . $baseDir);
             if ($baseDirVersion === false) {
                 return true;
             }
             apc_delete($baseDirVersion . "|" . $initDir);
         } else {
             apc_delete($this->sid . $baseDir);
         }
     }
     return true;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:29,代码来源:cacheengineapc.php

示例3: setUp

 /**
  * Check for extension availability and perform cleanup.
  */
 protected function setUp()
 {
     if (!extension_loaded('apc') || !ini_get('apc.enable_cli')) {
         $this->markTestSkipped('APC extension not available.');
     }
     apc_delete('test');
 }
开发者ID:djordjes,项目名称:layercache,代码行数:10,代码来源:APCTest.php

示例4: delete_data

 /**
  * (non-PHPdoc)
  * @see Ai1ec_Write_Data_To_Cache::delete_data()
  */
 public function delete_data($key)
 {
     if (false === apc_delete($this->_key($key))) {
         return false;
     }
     return true;
 }
开发者ID:sedici,项目名称:wpmu-istec,代码行数:11,代码来源:apc.php

示例5: unsetallAction

 public function unsetallAction()
 {
     foreach ($this->cache_keys as $key) {
         apc_delete($this->hash . '-' . $key);
     }
     $this->_redirect('/cache');
 }
开发者ID:jeremykendall,项目名称:spaz-api,代码行数:7,代码来源:CacheController.php

示例6: delete

 public function delete($key, $options= array()) {
     $deleted = false;
     if (!isset($options['multiple_object_delete']) || empty($options['multiple_object_delete'])) {
         $deleted= apc_delete($this->getCacheKey($key));
     }
     return $deleted;
 }
开发者ID:ncrossland,项目名称:revolution,代码行数:7,代码来源:xpdoapccache.class.php

示例7: delete

 /**
  * Remove an item from the cache:
  */
 public function delete($key)
 {
     if (!self::isEnabled()) {
         return false;
     }
     return apc_delete($this->cachePrefix . $key);
 }
开发者ID:dw250100785,项目名称:b8framework,代码行数:10,代码来源:ApcCache.php

示例8: remove

 public function remove($key)
 {
     if ($this->apcu) {
         return apcu_delete((string) $key);
     }
     return apc_delete((string) $key);
 }
开发者ID:maslosoft,项目名称:cache,代码行数:7,代码来源:Apc.php

示例9: delete

 public function delete($key)
 {
     if (!$this->isActive()) {
         return false;
     }
     return apc_delete($key);
 }
开发者ID:donwilson,项目名称:distynct,代码行数:7,代码来源:APC.php

示例10: clear

 public function clear($prefix = '')
 {
     $ns = $this->getNamespace() . $prefix;
     $ns = preg_quote($ns, '/');
     $iter = new \APCIterator('/^' . $ns . '/');
     return apc_delete($iter);
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:7,代码来源:apcu.php

示例11: delete

 /**
  * Delete cache by $key. Optional $delay seconds if supported.
  *
  * @param $key
  * @param int $delay
  * @return bool
  */
 public function delete($key, $delay = 0)
 {
     if (!$this->open()) {
         return false;
     }
     return apc_delete($key);
 }
开发者ID:nesbert,项目名称:nobjects,代码行数:14,代码来源:Apc.php

示例12: delete

	static function delete($key) {
		if (self::isAvailable()) {
			return apc_delete(APC_PREFIX . $key);
		} else {
			return false;
		}
	}
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:7,代码来源:APCWrapper.class.php

示例13: deleteCacheByPrefix

 /**
  * Removes all the cached files starting with $prefix
  * @param string $prefix The prefix
  * @return void
  */
 public function deleteCacheByPrefix($prefix)
 {
     $prefix = CACHEPREFIX . $prefix;
     foreach (new \APCIterator('user', "/^{$prefix}/") as $iterator) {
         apc_delete($iterator['key']);
     }
 }
开发者ID:rsids,项目名称:bright_api,代码行数:12,代码来源:APCCache.php

示例14: delItem

 public function delItem($key)
 {
     if (empty($key)) {
         throw new CacheException('CACHE ERROR:key is empty');
     }
     return apc_delete($key);
 }
开发者ID:tiger2soft,项目名称:LycPHP,代码行数:7,代码来源:Apc.class.php

示例15: deleteKey

 /**
  * Delete a key from the cache pool
  *
  * @param $key
  *
  * @return bool
  */
 public function deleteKey($key)
 {
     if (function_exists('apcu_delete')) {
         return apcu_delete($key);
     }
     return apc_delete($key);
 }
开发者ID:packaged,项目名称:dal,代码行数:14,代码来源:ApcConnection.php


注:本文中的apc_delete函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。