• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP xcache_unset_by_prefix函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: forget

 /**
  * Remove an item from the cache.
  *
  * @param  string  $key
  * @return bool
  */
 public function forget($key)
 {
     $pattern = $this->getPrefixWithLocale() . $key;
     if (strpos($pattern, '*') === false) {
         return xcache_unset($this->getPrefixWithLocale() . $key);
     }
     list($prefix) = explode('*', $pattern);
     return xcache_unset_by_prefix($prefix);
 }
开发者ID:jooorooo,项目名称:cache,代码行数:15,代码来源:XCacheStore.php


示例17: delete

 /**
  * Delete cache object (or entire namespace if $name is null)
  *
  * This method will throw only logical exceptions.
  * In case of failures, it will return a boolean false.
  *
  * @param   string  $name    Name for cache element
  *
  * @return  bool
  * @throws \Comodojo\Exception\CacheException
  */
 public function delete($name = null)
 {
     if (!$this->isEnabled()) {
         return false;
     }
     $this->resetErrorState();
     if (empty($name)) {
         $delete = xcache_unset_by_prefix($this->getNamespace());
     } else {
         $delete = xcache_unset($this->getNamespace() . "-" . md5($name));
     }
     if ($delete === false) {
         $this->raiseError("Error writing cache (XCache), exiting gracefully");
         $this->setErrorState();
     }
     return $delete;
 }
开发者ID:comodojo,项目名称:cache,代码行数:28,代码来源:XCacheCache.php


示例18: clear

 /**
  * This function should clear the cache tree using the key array provided. If called with no arguments the entire
  * cache needs to be cleared.
  *
  * @param  null|array $key
  * @return bool
  */
 public function clear($key = null)
 {
     if (isset($key)) {
         $key = array();
     }
     $keyString = $this->makeKey($key);
     if (!$keyString) {
         return false;
     }
     return xcache_unset_by_prefix($keyString);
 }
开发者ID:jenia-buianov,项目名称:all_my_sites,代码行数:18,代码来源:Xcache.php


示例19: removeAllByPrefix

 /**
  * remove all data from cache by key prefix
  * @return true on success
  */
 function removeAllByPrefix($s)
 {
     return xcache_unset_by_prefix($s);
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:8,代码来源:BxDolCacheXCache.php


示例20: flush

 /**
  * Flush all values 
  */
 public function flush()
 {
     xcache_unset_by_prefix($this->_prefix);
 }
开发者ID:ajaboa,项目名称:crmpuan,代码行数:7,代码来源:XCache.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP xcallable函数代码示例发布时间:2022-05-23
下一篇:
PHP xcache_unset函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap