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


PHP Cache::getStats方法代码示例

本文整理汇总了PHP中Doctrine\Common\Cache\Cache::getStats方法的典型用法代码示例。如果您正苦于以下问题:PHP Cache::getStats方法的具体用法?PHP Cache::getStats怎么用?PHP Cache::getStats使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doctrine\Common\Cache\Cache的用法示例。


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

示例1: build

 /**
  * @param EntityManager $em
  * @param bool $doCache
  * @param Cache|null $cache
  * @param CacheHitsContainer|null $hitsContainer
  * @return DbCacheableExecutor|DbExecutor
  */
 public static function build(EntityManagerInterface $em, $doCache = false, Cache $cache = null, CacheHitsContainer $hitsContainer = null)
 {
     if (!$cache) {
         return new DbExecutor($em);
     }
     try {
         $stats = $cache->getStats();
         if (isset($stats[Cache::STATS_UPTIME]) && !$stats[Cache::STATS_UPTIME]) {
             throw new \Exception('cache down');
         }
     } catch (\Exception $e) {
         return new DbExecutor($em);
     }
     if ($doCache) {
         return new DbCacheableExecutor($em, $cache, $hitsContainer);
     }
     return new DbExecutor($em);
 }
开发者ID:lsnova,项目名称:simple-query-executor,代码行数:25,代码来源:ExecutorFactory.php

示例2: getStats

 public function getStats()
 {
     return $this->cache->getStats();
 }
开发者ID:AWSRandall,项目名称:aws-sdk-php,代码行数:4,代码来源:DoctrineCacheAdapter.php

示例3: getStats

 public function getStats()
 {
     return $this->getEncryptionStats($this->decorated->getStats() ?: []);
 }
开发者ID:jeskew,项目名称:doctrine-cache-encrypter,代码行数:4,代码来源:Decorator.php

示例4: getStats

 public function getStats()
 {
     return self::$cache->getStats();
 }
开发者ID:natanaelsimoes,项目名称:zeus-framework,代码行数:4,代码来源:Cache.php

示例5: getStats

 /**
  * Retrieves cached information from the data store.
  *
  * The server's statistics array has the following values:
  *
  * - <b>hits</b>
  * Number of keys that have been requested and found present.
  *
  * - <b>misses</b>
  * Number of items that have been requested and not found.
  *
  * - <b>uptime</b>
  * Time that the server is running.
  *
  * - <b>memory_usage</b>
  * Memory used by this server to store items.
  *
  * - <b>memory_available</b>
  * Memory allowed to use for storage.
  *
  * @since 2.2
  *
  * @return array|null An associative array with server's statistics if available, NULL otherwise.
  */
 public function getStats()
 {
     return $this->doctrineCache->getStats();
 }
开发者ID:sphring,项目名称:sphring-cache,代码行数:28,代码来源:DoctrineCacheManager.php

示例6: getStats

 /**
  * Retrieves cached information from the data store.
  *
  * The server's statistics array has the following values:
  *
  * - <b>hits</b>
  * Number of keys that have been requested and found present.
  *
  * - <b>misses</b>
  * Number of items that have been requested and not found.
  *
  * - <b>uptime</b>
  * Time that the server is running.
  *
  * - <b>memory_usage</b>
  * Memory used by this server to store items.
  *
  * - <b>memory_available</b>
  * Memory allowed to use for storage.
  *
  * @since 2.2
  *
  * @return array|null An associative array with server's statistics if available, NULL otherwise.
  */
 public function getStats()
 {
     return $this->CacheDriver->getStats();
 }
开发者ID:AgniCMS,项目名称:agni-framework,代码行数:28,代码来源:Cache.php

示例7: getStats

 /**
  * @return array|null
  */
 public function getStats()
 {
     return $this->cacheProvider->getStats();
 }
开发者ID:caxy,项目名称:php-htmldiff,代码行数:7,代码来源:DiffCache.php


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