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


PHP xcache_unset_by_prefix函数代码示例

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


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

示例1: getBackend

 public function getBackend()
 {
     xcache_unset_by_prefix("cache");
     $backend = new \Cachet\Backend\XCache();
     $backend->setKeyBackend(new \Cachet\Backend\Memory());
     return $backend;
 }
开发者ID:shabbyrobe,项目名称:cachet,代码行数:7,代码来源:XCacheWithKeyBackendTest.php

示例2: deactivate

 public static function deactivate()
 {
     $pluginOpts = Typecho_Widget::widget('Widget_Options')->plugin('TypechoXcache');
     if ($pluginOpts->clearCacheAfterDisable == 'true') {
         xcache_unset_by_prefix($pluginOpts->{$prefix});
         return '缓存清空,成功关闭';
     }
     return '成功关闭';
 }
开发者ID:NAMAKABE,项目名称:TypechoXcache,代码行数:9,代码来源:Plugin.php

示例3: clear

 public function clear($prefix = '')
 {
     if (function_exists('xcache_unset_by_prefix')) {
         return xcache_unset_by_prefix($this->getNamespace() . $prefix);
     } else {
         // Since we can not clear by prefix, we just clear the whole cache.
         xcache_clear_cache(\XC_TYPE_VAR, 0);
     }
     return true;
 }
开发者ID:olucao,项目名称:owncloud-core,代码行数:10,代码来源:xcache.php

示例4: clear

 public function clear($prefix = '')
 {
     if (!function_exists('xcache_unset_by_prefix')) {
         function xcache_unset_by_prefix($prefix)
         {
             // Since we can't clear targetted cache, we'll clear all. :(
             xcache_clear_cache(XC_TYPE_VAR, 0);
         }
     }
     xcache_unset_by_prefix($this->getNamespace() . $prefix);
     return true;
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:12,代码来源:xcache.php

示例5: flush

 /**
  * Flush the cache.
  */
 function flush()
 {
     $prefix = INDEX_FILE_LOCATION . ':' . $this->getContext() . ':' . $this->getCacheId();
     if (function_exists('xcache_unset_by_prefix')) {
         // If possible, just flush the context
         xcache_unset_by_prefix(prefix);
     } else {
         // Otherwise, we need to do this manually
         for ($i = 0; $i < xcache_count(XC_TYPE_VAR); $i++) {
             $cache = xcache_list(XC_TYPE_VAR, $i);
             foreach ($cache['cache_list'] as $entry) {
                 if (substr($entry['name'], 0, strlen($prefix)) == $prefix) {
                     xcache_unset($entry['name']);
                 }
             }
         }
     }
 }
开发者ID:doana,项目名称:pkp-lib,代码行数:21,代码来源:XCacheCache.inc.php

示例6: cache_clean

 /**
  * Clean the memory cache
  */
 function cache_clean()
 {
     if (!TP_ENABLE_CACHE) {
         return;
     }
     if ($this->memcache_working) {
         $this->memcache->flush();
     } elseif (function_exists('apc_clear_cache')) {
         apc_clear_cache('user');
     } elseif (function_exists('xcache_unset_by_prefix')) {
         @xcache_unset_by_prefix();
     }
     //TODO - clean on eaccelerator is not so clean...
 }
开发者ID:rsantellan,项目名称:wordpress-ecommerce,代码行数:17,代码来源:transposh_db.php

示例7: clear

 public function clear($prefix = '')
 {
     xcache_unset_by_prefix($this->getNamespace() . $prefix);
     return true;
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:5,代码来源:xcache.php

示例8: free

 /**
  * (non-PHPdoc)
  * @see \parallely\TransportInterface::free()
  */
 public function free()
 {
     xcache_unset_by_prefix(self::PREFIX);
     return $this;
 }
开发者ID:hpbuniat,项目名称:parallely,代码行数:9,代码来源:Xcache.php

示例9: clear

 /**
  * @see Cache_driver::clear()
  */
 public function clear($realm = '')
 {
     if (!function_exists('xcache_unset_by_prefix')) {
         function xcache_unset_by_prefix($prefix)
         {
             // Since we can't clear targetted cache, we'll clear all. :(
             xcache_clear_cache(XC_TYPE_VAR, 0);
         }
     }
     if (empty($realm)) {
         xcache_unset_by_prefix('');
     } else {
         xcache_unset_by_prefix($realm . '/');
     }
     return true;
 }
开发者ID:Cotonti,项目名称:valencia,代码行数:19,代码来源:cache.php

示例10: flush

 /**
  * (Plug-in replacement for memcache API) Remove all data from the persistant cache.
  */
 function flush()
 {
     xcache_unset_by_prefix('');
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:7,代码来源:caches_xcache.php

示例11: clear

function clear($prefix_ = null)
{
    if (null === $prefix_) {
        xcache_unset_by_prefix(COMPONENTS_CACHE_NAMESPACE);
    } else {
        xcache_unset_by_prefix(COMPONENTS_CACHE_NAMESPACE . "-{$prefix_}");
    }
}
开发者ID:evalcodenet,项目名称:net.evalcode.components.runtime,代码行数:8,代码来源:xcache.php

示例12: flushStore

 protected function flushStore($cacheId)
 {
     $prefix = \Cachet\Helper::formatKey([$this->prefix, $cacheId]);
     xcache_unset_by_prefix($prefix);
 }
开发者ID:shabbyrobe,项目名称:cachet,代码行数:5,代码来源:XCache.php

示例13: deleteByPrefix

 public function deleteByPrefix($key)
 {
     if ($key != null) {
         $result = xcache_unset_by_prefix($this->prefix . $key);
     } else {
         return false;
     }
 }
开发者ID:NickMitin,项目名称:FuckFrameworks,代码行数:8,代码来源:bmXCache.php

示例14: flush

 /**
  * Emulates `Memcache::flush`.
  */
 public function flush()
 {
     return xcache_unset_by_prefix(self::$key_prefix);
 }
开发者ID:Selwyn-b,项目名称:elefant,代码行数:7,代码来源:MemcacheXCache.php

示例15: truncate

 public function truncate()
 {
     xcache_unset_by_prefix('');
     return TRUE;
 }
开发者ID:xianyuxmu,项目名称:alinkagarden-xiuno,代码行数:5,代码来源:cache.class.php


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