---
title: BioShowCacheHitRatio
description: "查询系统缓存命中率接口，查询结果的内存资源要求使用者调用BioFreeCacheHitPtr接口进行释放。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/252RC1/sds/kunpengboostIO_031.html
sourcePath: /source/zh/kunpengboostkithistory/252RC1/sds/kunpengboostIO_031.html
indexId: 5fa8b4ffc817bca88bdbb98eae19c7c1354fcac424c760686ef5b6d047e1537468
---
# BioShowCacheHitRatio

#### 函数定义

查询系统缓存命中率接口，查询结果的内存资源要求使用者调用BioFreeCacheHitPtr接口进行释放。


#### 实现方法

CResult BioShowCacheHitRatio(CacheHitFinalDesc *desc, CacheHitFinalDesc **nodeDesc, uint64_t *nodeNum)


#### 参数说明


**表1 参数说明**

| 参数名 | 数据类型 | 参数类型 | 描述 |
| --- | --- | --- | --- |
| desc | CacheHitFinalDesc\* | 出参 | 所有节点缓存命中率，参数解释参见表2 详细参数说明。 |
| nodeDesc | CacheHitFinalDesc\*\* | 出参 | 各节点缓存命中率。 |
| nodeNum | uint64\_t\* | 出参 | 节点数量。 |


**表2 详细参数说明**

| 参数 | 结构体字段 | 说明 |
| --- | --- | --- |
| CacheHitFinalDesc | nodeId | 节点ID。所有节点命中率为参数时为无效信息 |
| CacheHitFinalDesc | rCacheHitMemCount | 读缓存内存命中数。 |
| CacheHitFinalDesc | rCacheHitDiskCount | 读缓存磁盘命中数。 |
| CacheHitFinalDesc | rCacheHitCount | 读缓存命中总数。 |
| CacheHitFinalDesc | rCacheTotalCount | 读缓存查询总数。 |
| CacheHitFinalDesc | wCacheHitMemCount | 写缓存内存命中数。 |
| CacheHitFinalDesc | wCacheHitDiskCount | 写缓存磁盘命中数。 |
| CacheHitFinalDesc | wCacheHitCount | 写缓存命中总数。 |
| CacheHitFinalDesc | wCacheTotalCount | 读缓存查询总数。 |
| CacheHitFinalDesc | backendHitCount | 后端命中数。 |


#### 返回值


**表3 返回值说明**

| 返回值 | 描述 |
| --- | --- |
| RET\_CACHE\_OK | 操作成功。 |
| RET\_CACHE\_NOT\_READY | TurboIO服务未就绪。 |
| RET\_CACHE\_ERROR | 操作失败。 |
