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

PHP wincache_ucache_meminfo函数代码示例

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

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



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

示例1: __construct

	public function __construct() {
		$this->extension['redis'] = extension_loaded('redis');
		$this->extension['memcache'] = extension_loaded('memcache');
		$this->extension['apc'] = function_exists('apc_cache_info') && @apc_cache_info();
		$this->extension['xcache'] = function_exists('xcache_get');
		$this->extension['eaccelerator'] = function_exists('eaccelerator_get');
		$this->extension['wincache'] = function_exists('wincache_ucache_meminfo') && wincache_ucache_meminfo();
	}
开发者ID:noikiy,项目名称:travel,代码行数:8,代码来源:discuz_memory.php


示例2: memory

 function memory()
 {
     $this->extension['redis'] = extension_loaded('redis');
     $this->extension['memcache'] = extension_loaded('memcache');
     $this->extension['apc'] = function_exists('apc_cache_info') && apc_cache_info();
     $this->extension['xcache'] = function_exists('xcache_get');
     $this->extension['eaccelerator'] = function_exists('eaccelerator_get');
     $this->extension['wincache'] = function_exists('wincache_ucache_meminfo') && wincache_ucache_meminfo();
     $this->init();
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:10,代码来源:memory.class.php


示例3: doGetStats

 /**
  * {@inheritdoc}
  */
 protected function doGetStats()
 {
     $info = wincache_ucache_info();
     $meminfo = wincache_ucache_meminfo();
     return array(Cache::STATS_HITS => $info['total_hit_count'], Cache::STATS_MISSES => $info['total_miss_count'], Cache::STATS_UPTIME => $info['total_cache_uptime'], Cache::STATS_MEMORY_USAGE => $meminfo['memory_total'], Cache::STATS_MEMORY_AVAILIABLE => $meminfo['memory_free']);
 }
开发者ID:laiello,项目名称:masfletes,代码行数:9,代码来源:WinCacheCache.php


示例4: memInfo

 /**
  * @see wincache_ucache_meminfo();
  */
 public function memInfo()
 {
     return wincache_ucache_meminfo();
 }
开发者ID:veloper,项目名称:DDWinUCache,代码行数:7,代码来源:class.ddwinucache.php


示例5: getFillingPercentage

 /**
  * Return the filling percentage of the backend storage
  *
  * @throws IfwPsn_Vendor_Zend_Cache_Exception
  * @return int integer between 0 and 100
  */
 public function getFillingPercentage()
 {
     $mem = wincache_ucache_meminfo();
     $memSize = $mem['memory_total'];
     $memUsed = $memSize - $mem['memory_free'];
     if ($memSize == 0) {
         IfwPsn_Vendor_Zend_Cache::throwException('can\'t get WinCache memory size');
     }
     if ($memUsed > $memSize) {
         return 100;
     }
     return (int) (100.0 * ($memUsed / $memSize));
 }
开发者ID:jasmun,项目名称:Noco100,代码行数:19,代码来源:WinCache.php


示例6: get_records

 /**
  * @override \local_telemetry\request_state
  */
 public function get_records()
 {
     $record = new stdClass();
     $filecachefileinfo = wincache_fcache_fileinfo(true);
     if ($filecachefileinfo) {
         $record->f_f_uptime = $filecachefileinfo['total_cache_uptime'];
         $record->f_f_items = $filecachefileinfo['total_file_count'];
         $record->f_f_hits = $filecachefileinfo['total_hit_count'];
         $record->f_f_misses = $filecachefileinfo['total_miss_count'];
     }
     $filecachememinfo = wincache_fcache_meminfo();
     if ($filecachememinfo) {
         $record->f_m_total = $filecachememinfo['memory_total'];
         $record->f_m_free = $filecachememinfo['memory_free'];
         $record->f_m_used_blocks = $filecachememinfo['num_used_blks'];
         $record->f_m_free_blocks = $filecachememinfo['num_free_blks'];
         $record->f_m_overhead = $filecachememinfo['memory_overhead'];
     }
     $opcodecachefileinfo = wincache_ocache_fileinfo(true);
     if ($opcodecachefileinfo) {
         $record->o_f_uptime = $opcodecachefileinfo['total_cache_uptime'];
         $record->o_f_items = $opcodecachefileinfo['total_file_count'];
         $record->o_f_hits = $opcodecachefileinfo['total_hit_count'];
         $record->o_f_misses = $opcodecachefileinfo['total_miss_count'];
         $record->o_f_islocal = $opcodecachefileinfo['is_local_cache'];
     }
     $opcodecachememinfo = wincache_ocache_meminfo();
     if ($opcodecachememinfo) {
         $record->o_m_total = $opcodecachememinfo['memory_total'];
         $record->o_m_free = $opcodecachememinfo['memory_free'];
         $record->o_m_used_blocks = $opcodecachememinfo['num_used_blks'];
         $record->o_m_free_blocks = $opcodecachememinfo['num_free_blks'];
         $record->o_m_overhead = $opcodecachememinfo['memory_overhead'];
     }
     $resolvedpathcachefileinfo = wincache_rplist_fileinfo(true);
     if ($resolvedpathcachefileinfo) {
         $record->rp_f_files = $resolvedpathcachefileinfo['total_file_count'];
     }
     $resolvedpathcachememinfo = wincache_rplist_meminfo();
     if ($resolvedpathcachememinfo) {
         $record->rp_m_total = $resolvedpathcachememinfo['memory_total'];
         $record->rp_m_free = $resolvedpathcachememinfo['memory_free'];
         $record->rp_m_used_blocks = $resolvedpathcachememinfo['num_used_blks'];
         $record->rp_m_free_blocks = $resolvedpathcachememinfo['num_free_blks'];
         $record->rp_m_overhead = $resolvedpathcachememinfo['memory_overhead'];
     }
     $sessioncacheinfo = wincache_scache_info(true);
     if ($sessioncacheinfo) {
         $record->s_i_uptime = $sessioncacheinfo['total_cache_uptime'];
         $record->s_i_items = $sessioncacheinfo['total_item_count'];
         $record->s_i_islocal = $sessioncacheinfo['is_local_cache'];
         $record->s_i_hits = $sessioncacheinfo['total_hit_count'];
         $record->s_i_misses = $sessioncacheinfo['total_miss_count'];
     }
     $sessioncachememinfo = wincache_scache_meminfo();
     if ($sessioncachememinfo) {
         $record->s_m_total = $sessioncachememinfo['memory_total'];
         $record->s_m_free = $sessioncachememinfo['memory_free'];
         $record->s_m_used_blocks = $sessioncachememinfo['num_used_blks'];
         $record->s_m_free_blocks = $sessioncachememinfo['num_free_blks'];
         $record->s_m_overhead = $sessioncachememinfo['memory_overhead'];
     }
     $usercacheinfo = wincache_ucache_info(true);
     if ($usercacheinfo) {
         $record->u_i_uptime = $usercacheinfo['total_cache_uptime'];
         $record->u_i_items = $usercacheinfo['total_item_count'];
         $record->u_i_islocal = $usercacheinfo['is_local_cache'];
         $record->u_i_hits = $usercacheinfo['total_hit_count'];
         $record->u_i_misses = $usercacheinfo['total_miss_count'];
     }
     $usercachememinfo = wincache_ucache_meminfo();
     if ($usercachememinfo) {
         $record->u_m_total = $usercachememinfo['memory_total'];
         $record->u_m_free = $usercachememinfo['memory_free'];
         $record->u_m_used_blocks = $usercachememinfo['num_used_blks'];
         $record->u_m_free_blocks = $usercachememinfo['num_free_blks'];
         $record->u_m_overhead = $usercachememinfo['memory_overhead'];
     }
     return array($record);
 }
开发者ID:AVADOLearning,项目名称:moodle-local_telemetry,代码行数:83,代码来源:wincache_request_state.php


示例7: getAvailableSpace

 /**
  * Get available space in bytes
  *
  * @return int|float
  */
 public function getAvailableSpace()
 {
     $mem = wincache_ucache_meminfo();
     return $mem['memory_free'];
 }
开发者ID:CHRISTOPHERVANDOMME,项目名称:zf2complet,代码行数:10,代码来源:WinCache.php


示例8: internalGetCapacity

 /**
  * Internal method to get storage capacity.
  *
  * @param  array $normalizedOptions
  * @return array|boolean Capacity as array or false on failure
  * @throws Exception
  */
 protected function internalGetCapacity(array &$normalizedOptions)
 {
     $mem = wincache_ucache_meminfo();
     return array('free' => $mem['memory_free'], 'total' => $mem['memory_total']);
 }
开发者ID:bradley-holt,项目名称:zf2,代码行数:12,代码来源:WinCache.php


示例9: init_cache_info

function init_cache_info($cache_data = SUMMARY_DATA)
{
    global $ocache_mem_info, $ocache_file_info, $ocache_summary_info, $fcache_mem_info, $fcache_file_info, $fcache_summary_info, $rpcache_mem_info, $rpcache_file_info, $ucache_mem_info, $ucache_info, $scache_mem_info, $scache_info, $user_cache_available, $session_cache_available;
    if ($cache_data == SUMMARY_DATA || $cache_data == OCACHE_DATA) {
        $ocache_mem_info = wincache_ocache_meminfo();
        $ocache_file_info = wincache_ocache_fileinfo();
        $ocache_summary_info = get_ocache_summary($ocache_file_info['file_entries']);
    }
    if ($cache_data == SUMMARY_DATA || $cache_data == FCACHE_DATA) {
        $fcache_mem_info = wincache_fcache_meminfo();
        $fcache_file_info = wincache_fcache_fileinfo();
        $fcache_summary_info = get_fcache_summary($fcache_file_info['file_entries']);
    }
    if ($cache_data == SUMMARY_DATA || $cache_data == RCACHE_DATA) {
        $rpcache_mem_info = wincache_rplist_meminfo();
        $rpcache_file_info = wincache_rplist_fileinfo();
    }
    if ($user_cache_available && ($cache_data == SUMMARY_DATA || $cache_data == UCACHE_DATA)) {
        $ucache_mem_info = wincache_ucache_meminfo();
        $ucache_info = wincache_ucache_info();
    }
    if ($session_cache_available && ($cache_data == SUMMARY_DATA || $cache_data == SCACHE_DATA)) {
        $scache_mem_info = wincache_scache_meminfo();
        $scache_info = wincache_scache_info();
    }
}
开发者ID:laiello,项目名称:kangle-php-mysql,代码行数:26,代码来源:wincache.php


示例10: getStats

 /**
  * {@inheritDoc}
  */
 public function getStats()
 {
     $info = wincache_ucache_info(true);
     $meminfo = wincache_ucache_meminfo();
     return array(CacheInterface::STATS_SIZE => $info['total_item_count'], CacheInterface::STATS_HITS => $info['total_hit_count'], CacheInterface::STATS_MISSES => $info['total_miss_count'], CacheInterface::STATS_UPTIME => $info['total_cache_uptime'], CacheInterface::STATS_MEMORY_USAGE => $meminfo['memory_total'], CacheInterface::STATS_MEMORY_AVAILIABLE => $meminfo['memory_free']);
 }
开发者ID:Nyholm,项目名称:acache,代码行数:9,代码来源:WincacheCache.php


示例11: getStats

 /**
  * @return driverStatistic
  */
 public function getStats()
 {
     $memInfo = wincache_ucache_meminfo();
     $info = wincache_ucache_info();
     $date = (new \DateTime())->setTimestamp(time() - $info['total_cache_uptime']);
     return (new driverStatistic())->setInfo(sprintf("The Wincache daemon is up since %s.\n For more information see RawData.", $date->format(DATE_RFC2822)))->setSize($memInfo['memory_free'] - $memInfo['memory_total'])->setData(implode(', ', array_keys($this->itemInstances)))->setRawData($memInfo);
 }
开发者ID:jigoshop,项目名称:Jigoshop2,代码行数:10,代码来源:Driver.php


示例12: getCapacity

 /**
  * Get storage capacity.
  *
  * @param  array $options
  * @return array|boolean Capacity as array or false on failure
  *
  * @triggers getCapacity.pre(PreEvent)
  * @triggers getCapacity.post(PostEvent)
  * @triggers getCapacity.exception(ExceptionEvent)
  */
 public function getCapacity(array $options = array())
 {
     $args = new ArrayObject(array('options' => &$options));
     try {
         $eventRs = $this->triggerPre(__FUNCTION__, $args);
         if ($eventRs->stopped()) {
             return $eventRs->last();
         }
         $mem = wincache_ucache_meminfo();
         $result = array('free' => $mem['memory_free'], 'total' => $mem['memory_total']);
         return $this->triggerPost(__FUNCTION__, $args, $result);
     } catch (\Exception $e) {
         return $this->triggerException(__FUNCTION__, $args, $e);
     }
 }
开发者ID:navtis,项目名称:xerxes-pazpar2,代码行数:25,代码来源:WinCache.php


示例13: stats

 /**
  * Returns an array with stats and usage informations for display.
  *
  * @return array
  */
 public function stats()
 {
     $info = wincache_ucache_info();
     $meminfo = wincache_ucache_meminfo();
     return [CacheInterface::STATS_HITS => $info['total_hit_count'], CacheInterface::STATS_MISSES => $info['total_miss_count'], CacheInterface::STATS_UPTIME => $info['total_cache_uptime'], CacheInterface::STATS_MEMORY_USAGE => $meminfo['memory_total'], CacheInterface::STATS_MEMORY_AVAILIABLE => $meminfo['memory_free']];
 }
开发者ID:ksst,项目名称:kf,代码行数:11,代码来源:Wincache.php


示例14: stats

 /**
  * {@inheritdoc}
  */
 public function stats()
 {
     $stats = wincache_ucache_info();
     $memory = wincache_ucache_meminfo();
     return [static::HITS => $stats['total_hit_count'], static::MISSES => $stats['total_miss_count'], static::UPTIME => $stats['total_cache_uptime'], static::MEMORY_USAGE => $memory['memory_total'], static::MEMORY_AVAILABLE => $memory['memory_free']];
 }
开发者ID:vpg,项目名称:titon.cache,代码行数:9,代码来源:WincacheStorage.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP wincache_ucache_set函数代码示例发布时间:2022-05-23
下一篇:
PHP wincache_ucache_info函数代码示例发布时间: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